def setUp(self):
     super().setUp()
     self.par = self.create_unit('Par', 'army', 'France')
     self.eng = self.create_unit('ENG', 'fleet', 'France')
     self.issue_move_order(self.par, 'Bur')
     self.issue_move_order(self.eng, 'Bel')
     DiplomaticTurnProcessor(self.game, self.request_data).process_turn()
 def setUp(self):
     super().setUp()
     self.ber = self.create_unit('Ber', 'army', 'Germany')
     self.pru = self.create_unit('Pru', 'army', 'Russia')
     self.issue_move_order(self.ber, 'Pru')
     self.issue_move_order(self.pru, 'Ber')
     DiplomaticTurnProcessor(self.game, self.request_data).process_turn()
Пример #3
0
def get_turn_processor(game, data):
    phase = game.current_turn().phase
    if phase == 'diplomatic':
        return DiplomaticTurnProcessor(game, data)
    elif phase == 'retreat':
        return RetreatTurnProcessor(game, data)
    elif phase == 'reinforcement':
        return ReinforcementTurnProcessor(game, data)
 def setUp(self):
     super().setUp()
     self.mar = self.create_unit('Mar', 'army', 'France')
     self.gas = self.create_unit('Gas', 'army', 'France')
     self.bur = self.create_unit('Bur', 'army', 'Germany')
     self.issue_move_order(self.mar, 'Bur')
     self.issue_support_order(self.gas, self.mar, 'Bur')
     DiplomaticTurnProcessor(self.game, self.request_data).process_turn()
 def setUp(self):
     super().setUp()
     self.lvp = self.create_unit('Lvp', 'army', 'England')
     self.iri = self.create_unit('IRI', 'fleet', 'England')
     self.mao = self.create_unit('MAO', 'fleet', 'England')
     self.create_convoy_route(self.lvp, 'Spa', 'NC',
                              convoyers=[self.iri, self.mao])
     DiplomaticTurnProcessor(self.game, self.request_data).process_turn()
 def setUp(self):
     super().setUp()
     self.lon = self.create_unit('Lon', 'army', 'England')
     self.nth = self.create_unit('NTH', 'fleet', 'England')
     self.bel = self.create_unit('Bel', 'army', 'France')
     self.eng = self.create_unit('ENG', 'fleet', 'France')
     self.create_convoy_route(self.lon, 'Bel', convoyers=[self.nth])
     self.create_convoy_route(self.bel, 'Lon', convoyers=[self.eng])
     DiplomaticTurnProcessor(self.game, self.request_data).process_turn()
 def setUp(self):
     super().setUp()
     self.tun = self.create_unit('Tun', 'army', 'France')
     self.tys = self.create_unit('TYS', 'fleet', 'France')
     self.nap = self.create_unit('Nap', 'fleet', 'Italy')
     self.ion = self.create_unit('ION', 'fleet', 'Italy')
     self.create_convoy_route(self.tun, 'Nap', convoyers=[self.tys])
     self.issue_move_order(self.ion, 'TYS')
     self.issue_support_order(self.nap, self.ion, 'TYS')
     DiplomaticTurnProcessor(self.game, self.request_data).process_turn()
 def setUp(self):
     super().setUp()
     self.vie = self.create_unit('Vie', 'army', 'Austria')
     self.tri = self.create_unit('Tri', 'army', 'Austria')
     self.ser = self.create_unit('Ser', 'army', 'Austria')
     self.bud = self.create_unit('Bud', 'army', 'Russia')
     self.issue_move_order(self.vie, 'Tri')
     self.issue_move_order(self.ser, 'Bud')
     self.issue_support_order(self.tri, self.ser, 'Bud')
     DiplomaticTurnProcessor(self.game, self.request_data).process_turn()
 def setUp(self):
     super().setUp()
     self.lon = self.create_unit('Lon', 'army', 'England')
     self.eng = self.create_unit('ENG', 'fleet', 'England')
     self.nth = self.create_unit('NTH', 'fleet', 'England')
     self.bre = self.create_unit('Bre', 'fleet', 'France')
     self.iri = self.create_unit('IRI', 'fleet', 'France')
     self.create_convoy_route(self.lon, 'Bel', convoyers=[self.eng])
     self.create_convoy_route(self.lon, 'Bel', convoyers=[self.nth])
     self.issue_move_order(self.bre, 'ENG')
     self.issue_support_order(self.iri, self.bre, 'ENG')
     DiplomaticTurnProcessor(self.game, self.request_data).process_turn()
 def setUp(self):
     super().setUp()
     self.ber = self.create_unit('Ber', 'army', 'Germany')
     self.mun = self.create_unit('Mun', 'army', 'Germany')
     self.pru = self.create_unit('Pru', 'army', 'Russia')
     self.sil = self.create_unit('Sil', 'army', 'Russia')
     self.boh = self.create_unit('Boh', 'army', 'Austria')
     self.tyr = self.create_unit('Tyr', 'army', 'Austria')
     self.issue_move_order(self.mun, 'Sil')
     self.issue_move_order(self.pru, 'Ber')
     self.issue_support_order(self.sil, self.pru, 'Ber')
     self.issue_move_order(self.boh, 'Mun')
     self.issue_support_order(self.tyr, self.boh, 'Mun')
     DiplomaticTurnProcessor(self.game, self.request_data).process_turn()
 def setUp(self):
     super().setUp()
     self.sev = self.create_unit('Sev', 'army', 'Russia')
     self.rum = self.create_unit('Rum', 'army', 'Russia')
     self.ser = self.create_unit('Ser', 'army', 'Russia')
     self.gre = self.create_unit('Gre', 'army', 'Russia')
     self.bul = self.create_unit('Bul', 'army', 'Turkey')
     self.bla = self.create_unit('BLA', 'army', 'Turkey')
     self.issue_move_order(self.sev, 'Rum')
     self.issue_move_order(self.rum, 'Bul')
     self.issue_support_order(self.ser, self.rum, 'Bul')
     self.issue_support_order(self.gre, self.rum, 'Bul')
     self.issue_move_order(self.bul, 'Rum')
     self.issue_support_order(self.bla, self.bul, 'Rum')
     DiplomaticTurnProcessor(self.game, self.request_data).process_turn()
 def setUp(self):
     super().setUp()
     self.set_current_turn(1901, 'fall', 'diplomatic')
     DiplomaticTurnProcessor(self.game, self.request_data).process_turn()
 def setUp(self):
     super().setUp()
     DiplomaticTurnProcessor(self.game, self.request_data).process_turn()