Add a basic enemy turn, completing Part 5
This commit is contained in:
parent
1636f60096
commit
0331834090
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user