Пример #1
0
 def test_fleet_all_neighbouring_seas_occupied(self):
     retreating_fleet = Fleet(self.state, 0, Nations.FRANCE,
                              self.territories.BARRENTS_SEA)
     Army(self.state, 0, Nations.RUSSIA, self.territories.ST_PETERSBURG)
     Army(self.state, 0, Nations.RUSSIA, self.territories.NORWAY)
     Fleet(self.state, 0, Nations.RUSSIA, self.territories.NORWEGIAN_SEA)
     self.assertFalse(retreating_fleet.can_retreat())
Пример #2
0
 def test_fleet_can_retreat_to_coast(self):
     retreating_fleet = Fleet(0, Nations.FRANCE,
                              self.territories.BARRENTS_SEA)
     norway_army = Army(0, Nations.RUSSIA, self.territories.NORWAY)
     norwegian_sea_fleet = Fleet(0, Nations.RUSSIA,
                                 self.territories.NORWEGIAN_SEA)
     self.state.register(retreating_fleet, norway_army, norwegian_sea_fleet)
     self.state.post_register_updates()
     self.assertTrue(retreating_fleet.can_retreat())
Пример #3
0
 def test_fleet_all_neighbouring_seas_occupied(self):
     retreating_fleet = Fleet(0, Nations.FRANCE,
                              self.territories.BARRENTS_SEA)
     stp_army = Army(0, Nations.RUSSIA, self.territories.ST_PETERSBURG)
     norway_army = Army(0, Nations.RUSSIA, self.territories.NORWAY)
     norwegian_sea_fleet = Fleet(0, Nations.RUSSIA,
                                 self.territories.NORWEGIAN_SEA)
     self.state.register(retreating_fleet, stp_army, norway_army,
                         norwegian_sea_fleet)
     self.state.post_register_updates()
     self.assertFalse(retreating_fleet.can_retreat())
Пример #4
0
 def test_fleet_can_retreat_to_coast(self):
     retreating_fleet = Fleet(self.state, 0, Nations.FRANCE,
                              self.territories.BARRENTS_SEA)
     Army(self.state, 0, Nations.RUSSIA, self.territories.NORWAY)
     Fleet(self.state, 0, Nations.RUSSIA, self.territories.NORWEGIAN_SEA)
     self.assertTrue(retreating_fleet.can_retreat())