Esempio n. 1
0
 def get_state_for(self, avatar_wrapper, fog_of_war=fog_of_war):
     processed_world_map = fog_of_war.apply_fog_of_war(self.world_map, avatar_wrapper)
     return {
         'avatar_state': avatar_wrapper.serialise(),
         'world_map': {
             'cells': [cell.serialise() for cell in processed_world_map.all_cells()]
         }
     }
Esempio n. 2
0
 def get_state_for(self, avatar_wrapper):
     processed_world_map = fog_of_war.apply_fog_of_war(self.world_map, avatar_wrapper)
     return {
         'avatar_state': avatar_wrapper.serialise(),
         'world_map': {
             'cells': [cell.serialise() for cell in processed_world_map.all_cells()]
         }
     }
     return WorldView(avatar_wrapper, processed_world_map, self.avatar_manager)
Esempio n. 3
0
 def get_state_for(self, avatar_wrapper):
     processed_world_map = fog_of_war.apply_fog_of_war(self.world_map, avatar_wrapper)
     return WorldView(avatar_wrapper, processed_world_map, self.avatar_manager)
Esempio n. 4
0
 def get_state_for(self, avatar_wrapper):
     processed_world_map = fog_of_war.apply_fog_of_war(
         self.world_map, avatar_wrapper)
     return WorldView(avatar_wrapper, processed_world_map,
                      self.avatar_manager)