Ejemplo n.º 1
0
    # If user chooses right...
    elif choice == "d":
        # Move right
        game_state.move(RIGHT)

    # If user chooses up...
    elif choice == "w":
        # Move up
        game_state.move(UP)

    # If user chooses down...
    elif choice == "s":
        # Move down
        game_state.move(DOWN)

    # If user chooses to quit
    elif choice == "q":
        # Set gameOver to True
        game_state.game_over = True

    # Otherwise...
    else:
        print("That wasn't a choice")

    # Check for game over sequence
    if game_state.game_over:
        game_state.display()
        game_state.update_high_score()
        print("Game Over.")
        print()