コード例 #1
0
 def test_that_construction_is_possible_with_enough_productions(self):
     right_player = Player({'production': {}})
     left_player = Player({'production': {}})
     player = Player({'production': {}})
     player.with_neighbor(right_player, left_player)
     player.build_structure(self.structures['Stone Pit'])
     self.assertEqual(player.build_cost(self.structures['Baths']['cost']),
                      0)
コード例 #2
0
 def test_that_construction_is_possible_with_chaining(self):
     left_player = Player({'production': {}})
     right_player = Player({'production': {}})
     player = Player({'production': {}})
     player.with_neighbor(left_player, right_player)
     right_player.with_neighbor(player, left_player)
     left_player.with_neighbor(right_player, player)
     player.build_structure(self.structures['Theater'])
     self.assertEqual(
         player.build_cost(self.structures_2['Statue']['cost']), 0)
コード例 #3
0
 def test_that_construction_is_possible_with_left_commerce(self):
     left_player = Player({'production': {}})
     right_player = Player({'production': {}})
     player = Player({'production': {}})
     player.with_neighbor(left_player, right_player)
     right_player.with_neighbor(player, left_player)
     left_player.with_neighbor(right_player, player)
     left_player.build_structure(self.structures['Stone Pit'])
     self.assertEqual(player.build_cost(self.structures['Baths']['cost']),
                      2)