Research portable Memory game | Исследовать портируемую игру Память
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

shell.py 692B

6 months ago
123456789101112131415161718192021222324252627282930313233343536
  1. from shell_Context import *
  2. from llm import *
  3. # Greet the user upon start
  4. @llm_by_value
  5. def shell_start(
  6. c: shell_Context
  7. ) -> shell_Context:
  8. c.output = "Shell.StartText"
  9. c.recentField = "output"
  10. return c
  11. #}
  12. # Switch among CLI functions based on input
  13. #
  14. # Conditions:
  15. # 1. User requested to quit the game
  16. # 2. User plays the game
  17. @llm_by_value
  18. def shell_processInput(
  19. c: shell_Context
  20. ) -> shell_Context:
  21. if (
  22. c.input == "e" or
  23. c.input == "exit" or
  24. c.input == "q" or
  25. c.input == "quit"
  26. ):
  27. c.exit = True
  28. c.recentField = "exit"
  29. return c
  30. c.output = "TODO Call all CLI functions, let them process game input"
  31. c.recentField = "output"
  32. return c
  33. #}