Research portable Memory game | Исследовать портируемую игру Память
Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- from cli import *
- from shell_Context import *
- from llm import *
-
- # Greet the user upon start
- @llm_by_value
- def shell_start(
- c: shell_Context
- ) -> shell_Context:
- c.cCLI = cli_greetUser(c.cCLI)
- c.cCLI.input = "help"
- c.cCLI = cli_showHelp(c.cCLI)
-
- c.output = c.cCLI.outputGreeting + "\n" + c.cCLI.outputHelp
- c.recentField = "output"
- return c
- #}
-
- # Switch among CLI functions based on input
- #
- # Conditions:
- # 1. User requested to quit the game
- # 2. User plays the game
- @llm_by_value
- def shell_processInput(
- c: shell_Context
- ) -> shell_Context:
- if (
- c.input == "e" or
- c.input == "exit" or
- c.input == "q" or
- c.input == "quit"
- ):
- c.exit = True
- c.recentField = "exit"
- return c
-
- c.cCLI.input = c.input
- c.output = ""
-
- c.cCLI = cli_showHelp(c.cCLI)
- if (
- c.cCLI.recentField == "outputHelp"
- ):
- c.output += c.cCLI.outputHelp
-
- c.recentField = "output"
- return c
- #}
|