From 70c17b6235a30f9484480844eb70ba5f9fb330ae Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 12 May 2022 08:49:46 -0700 Subject: [PATCH] Condense the declaration of engine.hero; add a FIXME --- roguebasin/engine.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/roguebasin/engine.py b/roguebasin/engine.py index 679a168..fbe2895 100644 --- a/roguebasin/engine.py +++ b/roguebasin/engine.py @@ -45,10 +45,7 @@ class Engine: self.rng = tcod.random.Random() self.map = Map(configuration.map_size) - - first_room = self.map.generator.rooms[0] - hero_start_position = first_room.center - self.hero = Hero(position=hero_start_position) + self.hero = Hero(position=self.map.generator.rooms[0].center) self.entities: MutableSet[Entity] = {self.hero} for room in self.map.rooms: @@ -89,6 +86,7 @@ class Engine: def update_field_of_view(self) -> None: '''Compute visible area of the map based on the player's position and point of view.''' + # FIXME: Move this to the Map class self.map.visible[:] = tcod.map.compute_fov( self.map.tiles['transparent'], tuple(self.hero.position),