Ejemplo n.º 1
0
    def __init__(self, trainer):
        """ Initialize the Marathon Controller """
        self.marathon = Marathon()
        self.trainer = trainer
        screen = MarathonScreen(self.marathon)

        cmds = {commands.SELECT: self.select, commands.EXIT: self.stopRunning}
        PygameController.__init__(self, screen, commands=cmds)
Ejemplo n.º 2
0
 def __init__(self, trainer):
     """ Initialize the Marathon Controller """
     self.marathon = Marathon()
     self.trainer = trainer
     screen = MarathonScreen(self.marathon)
     
     cmds = {commands.SELECT:self.select,
             commands.EXIT:self.stopRunning}
     PygameController.__init__(self, screen, commands=cmds)
Ejemplo n.º 3
0
class MarathonController(PygameController):
    """ Controller for a Marathon """
    
    def __init__(self, trainer):
        """ Initialize the Marathon Controller """
        self.marathon = Marathon()
        self.trainer = trainer
        screen = MarathonScreen(self.marathon)
        
        cmds = {commands.SELECT:self.select,
                commands.EXIT:self.stopRunning}
        PygameController.__init__(self, screen, commands=cmds)
                     
    def select(self):
        """ Performs a Select """
        if self.marathon.beaten():
            self.stopRunning()
        else:
            zone = self.marathon.loadZone()
            self.runController(ZoneController(self.trainer, zone, 1, 2, doneCallback=self.marathon.beaten))
Ejemplo n.º 4
0
class MarathonController(PygameController):
    """ Controller for a Marathon """
    
    def __init__(self, trainer):
        """ Initialize the Marathon Controller """
        self.marathon = Marathon()
        self.trainer = trainer
        screen = MarathonScreen(self.marathon)
        
        cmds = {commands.SELECT:self.select,
                commands.EXIT:self.stopRunning}
        PygameController.__init__(self, screen, commands=cmds)
                     
    def select(self):
        """ Performs a Select """
        if self.marathon.beaten():
            self.stopRunning()
        else:
            zone = self.marathon.loadZone()
            self.runController(ZoneController(self.trainer, zone, 1, 2, doneCallback=self.marathon.beaten))