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")
def main(): state = GameState() state.HitPoints = 100 Program.RunGUI(onload)
def handleInput(sender, e): state = GameState() state.GameText = "You said: " + sender.Text Program.SetState( ExportGameState(state) ) myFunction()