コード例 #1
0
 def test_captured_includes_controlled_by_other(self):
     territory = InlandTerritory(self.state,
                                 1,
                                 'Paris',
                                 2, [],
                                 controlled_by=self.other_nation.id)
     territory.captured_by = self.nation.id
     self.assertEqual(self.nation.captured_territories, [territory])
コード例 #2
0
 def test_next_turn_supply_center_count_captured_from_other(self):
     territory = InlandTerritory(self.state,
                                 1,
                                 'Paris',
                                 2, [],
                                 True,
                                 controlled_by=self.other_nation.id)
     territory.captured_by = self.nation.id
     self.assertEqual(self.nation.next_turn_supply_center_count, 1)
コード例 #3
0
 def test_does_not_include_no_supply_center_captured(self):
     territory = InlandTerritory(self.state, 1, 'Paris', 2, [])
     territory.captured_by = self.nation.id
     self.assertEqual(self.nation.next_turn_supply_center_count, 0)