示例#1
0
 def test_begin_turn(self):
     from gravita.player import Player
     player = Player('bar', MockRace())
     player.ships.add('one')
     player.ships.add('two')
     self.assertFalse(player.to_move)
     self.assertFalse(player.actions_remaining)
     player.begin_turn()
     self.assertEqual(player.to_move, player.ships)
     self.assertEqual(player.actions_remaining, player.actions_per_turn)
示例#2
0
 def test_begin_turn_updates_resources(self):
     from gravita.player import Player
     player = Player('bar', MockRace())
     self.assertEqual(player.resources, 0)
     self.assertEqual(player.research, 0)
     player.begin_turn()
     self.assertEqual(player.resources, 2)
     self.assertEqual(player.research, 1)
     player.begin_turn()
     self.assertEqual(player.resources, 4)
     self.assertEqual(player.research, 2)