, , , . .
(, Python):
def main_loop():
while not finished:
command_text = ask_user_for_input()
execute_player_command(command_text)
update_world()
send_output_to_player()
def execute_player_command(command_text):
command, parameters = parse(command_text)
command.execute(player, parameters)
def update_world():
for each creature in all_creatures:
creature.update()
for each object in all_objects:
object.update()
, , , -, , , , update_world - . , , . , , .
. , , , , . , , , , . , , .. , .