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.set_current_turn(1902, 'fall', 'retreat') self.mun = self.create_displaced_unit('army', 'Germany', 'Mun', 'Tyr') self.par = self.create_displaced_unit('army', 'France', 'Par', 'Bre') self.issue_move_order(self.mun, 'Bur') self.issue_move_order(self.par, 'Bur') RetreatTurnProcessor(self.game, self.request_data).process_turn()
def setUp(self): super().setUp() self.set_current_turn(1901, 'fall', 'retreat') RetreatTurnProcessor(self.game, self.request_data).process_turn()
def setUp(self): super().setUp() self.set_current_turn(1901, 'fall', 'retreat') self.gas = self.create_displaced_unit('army', 'France', 'Gas', 'Mun') self.issue_move_order(self.gas, 'Pic') RetreatTurnProcessor(self.game, self.request_data).process_turn()
def setUp(self): super().setUp() self.set_current_turn(1901, 'fall', 'retreat') self.sev = self.create_displaced_unit('fleet', 'Russia', 'Sev', 'BLA') RetreatTurnProcessor(self.game, self.request_data).process_turn()
def setUp(self): super().setUp() self.set_current_turn(1902, 'spring', 'retreat') self.tri = self.create_displaced_unit('army', 'Austria', 'Tri', 'Vie') self.issue_delete_order(self.tri) RetreatTurnProcessor(self.game, self.request_data).process_turn()