def test_export(self): game_map = MapFactory().create(DefaultConfiguration()) game = Game(game_map) self.assertCountEqual( game.export(0), dict( map=game_map.export(), bots=game._export_bots(0), map_width=game_map.width, map_height=game_map.height, map_resolutions=(game_map.width, game_map.height) ) )
def test_export(self): game_map = MapFactory.create(DefaultConfiguration()) game = Game(game_map) bot_id = 0 game.add_bot(bot_id) self.assertCountEqual( game.export(bot_id), dict( map=game_map.export(), game_info=dict( map_resolutions=dict( width=game_map.width, height=game_map.height ), rounded_game=DefaultConfiguration.rounded_game, battery_game=DefaultConfiguration.battery_game, laser_game=DefaultConfiguration.laser_game ), ) )