def begin(self, playerTrainer, oppTrainer): """ Starts showing the Battle Screen and initializes the Battle """ self.battle = Battle(playerTrainer, oppTrainer) self.screen = ConsoleBattleScreen(self.battle) # Set the Player Trainer to use the screen playerTrainer.screen = self.screen # Introduce the Battle Environment self.screen.introduce() messages = self.battle.sendOutPkmnToStart() self.screen.reportMessages(messages) # Start the Game Loop self.gameLoop()
def __init__(self, playerTrainer, oppTrainer): """ Builds the Battle Controller """ self.battle = Battle(playerTrainer, oppTrainer) screen = BattleScreen(self.battle) PygameController.__init__(self, screen)