1
0

Add a basic enemy turn, completing Part 5

This commit is contained in:
Timothy Warren 2022-01-07 15:55:08 -05:00
parent 1636f60096
commit 0331834090

View File

@ -21,6 +21,10 @@ class Engine:
self.player = player
self.update_fov()
def handle_enemy_turns(self) -> None:
for entity in self.game_map.entities - {self.player}:
print(f'The {entity.name} wonders when it will get to take a real turn.')
def handle_events(self, events: Iterable[Any]) -> None:
for event in events:
action = self.event_handler.dispatch(event)
@ -29,6 +33,7 @@ class Engine:
continue
action.perform(self, self.player)
self.handle_enemy_turns()
# Update the FOV before the player's next action.
self.update_fov()