Esempio n. 1
0
def main():
    command = None
    gameState = GameState(Assets(100.0, 10, 10, 10))
    quit = False

    welcome()

    while not quit:
        command = getCommand(gameState.turnCount)

        if command == "q":
            quit = True

        processCommand(command)  # Defined in Decisions

        gameState.turnCount += 1  # NO ++

    print("\nCONGRATULATIONS! You lasted " + str(gameState.turnCount) +
          " rounds.\n")
Esempio n. 2
0
def main():
    state = GameState()
    state.HitPoints = 100
    Program.RunGUI(onload)
Esempio n. 3
0
def handleInput(sender, e):
    state = GameState()
    state.GameText = "You said: " + sender.Text
    Program.SetState( ExportGameState(state) )
    myFunction()