Example #1
0
 def initialize_fov(self, dungeon_level):
   self.state.fov_map_map[dungeon_level] = libtcod.map_new(MapConstants.MAP_WIDTH, MapConstants.MAP_HEIGHT)
   libtcod.console_clear(self.state.con)
   for y in range(MapConstants.MAP_HEIGHT):
     for x in range(MapConstants.MAP_WIDTH):
       libtcod.map_set_properties(self.state.fov_map_map[dungeon_level], x, y, True, True)
   self.state.fov_map = self.state.fov_map_map[dungeon_level]
Example #2
0
 def initialize_fov(self, dungeon_level):
   self.state.fov_map_map[dungeon_level] = libtcod.map_new(MapConstants.MAP_WIDTH, MapConstants.MAP_HEIGHT)
   libtcod.console_clear(self.state.con)
   for y in range(MapConstants.MAP_HEIGHT):
     for x in range(MapConstants.MAP_WIDTH):
       libtcod.map_set_properties(self.state.fov_map_map[dungeon_level], x, y,
                                  not self.state.game_map.is_blocked_sight(self.state.objects, x, y),
                                  not self.state.game_map.is_blocked_sight(self.state.objects, x, y))
   self.state.fov_map = self.state.fov_map_map[dungeon_level]