コード例 #1
0
def main():
    evt_mgr = Mediator()
    clock = CPUSpinnerController(evt_mgr) # controller 1
    # controller = KeyboardController(evt_mgr) # controller 2
    controller = KeyboardController2(evt_mgr) # controller 2
    view = MainView(evt_mgr) # view
    model = Game(evt_mgr) # model
    clock.run()
コード例 #2
0
ファイル: shallowspace.py プロジェクト: speque/shallowspace
def main():
    """Main program to start the game"""
    
    parser = argparse.ArgumentParser(description='Shallow Space')
    parser.add_argument('-d', '--debug', dest='debug', action='store_true',
       default=False, help='turn on debug')

    args = parser.parse_args()

    constants.DEBUG = args.debug

    event_manager = EventManager()

    keyboard_controller = KeyboardController(event_manager)
    spinner = CPUSpinnerController(event_manager)
    game = Game(event_manager)
    pygame_view = PygameView(event_manager)
    
    spinner.run()