Ejemplo n.º 1
0
        if event.type == pygame.QUIT: 
            menu.current_state = -1
            
    localGame = LocalGame(1, menu.diff, screen, menu)
    
    if (menu.current_state == 0):
        menu.run_menu_page(screen)
        
    elif (menu.current_state == 1):
        localGame.mode = 1
        localGame.run_game()
        
    elif (menu.current_state == 2):
        localGame.mode = 2
        localGame.run_game()

    elif (menu.current_state ==3):
        # Should determine whether or not there is already a host
        # on the LAN. If not, player becomes host and waits for someone to join.
        # Otherwise, player is client and joins host game.
        pass
        
    elif (menu.current_state == 4):
        menu.run_settings_page(screen)

    # This should never happen; if so, we default to 1
    else:
        localGame.mode = 1
        localGame.run_game()