Research portable Memory game | Исследовать портируемую игру Память
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

77 wiersze
2.1KB

  1. from cli import *
  2. from cli_test import *
  3. from ctx import *
  4. from ctx_test import *
  5. from ctx_test_Python import *
  6. from llm_test import *
  7. from llm_test_Python import *
  8. from memory_test import *
  9. import sys
  10. print(ctx_test_Controller_executeFunctions_set())
  11. print(ctx_test_Controller_processQueue())
  12. print(ctx_test_Python_Controller_registerFieldCallback_match())
  13. print(ctx_test_Python_Controller_registerFieldCallback_mismatch())
  14. print(ctx_test_memoryContext_field())
  15. print(ctx_test_memoryContext_setField())
  16. print(llm_test_Python_copyByValue())
  17. print(llm_test_isDigit_digit())
  18. print(llm_test_isDigit_notDigit())
  19. print(llm_test_strToInt())
  20. print(memory_test_detectMismatchedItems())
  21. print(memory_test_detectMismatchedItems_itemTwice())
  22. print(memory_test_detectVictory())
  23. print(memory_test_generateConstPlayfield())
  24. print(memory_test_hideMatchingItems())
  25. print(memory_test_selectItem_1x())
  26. print(memory_test_selectItem_2x())
  27. print(memory_test_selectItem_3x())
  28. print(cli_test_exit_e())
  29. print(cli_test_exit_exit())
  30. print(cli_test_exit_victory())
  31. print(cli_test_exit_q())
  32. print(cli_test_exit_quit())
  33. print(cli_test_goOn())
  34. print(cli_test_greetUser())
  35. print(cli_test_showHelp_h())
  36. print(cli_test_showHelp_help())
  37. print(cli_test_selectItem())
  38. print(cli_test_promptSecondItemSelection())
  39. print(cli_test_reportMatchedItems())
  40. print(cli_test_reportMismatchedItems())
  41. print(cli_test_reportVictory())
  42. ctrl = ctx_Controller(memory_createContext())
  43. ctrl.registerFunctions([
  44. cli_exit,
  45. cli_goOn,
  46. cli_greetUser,
  47. cli_promptSecondItemSelection,
  48. cli_reportMatchedItems,
  49. cli_reportMismatchedItems,
  50. cli_reportVictory,
  51. cli_selectItem,
  52. cli_showHelp,
  53. memory_detectMismatchedItems,
  54. memory_detectVictory,
  55. memory_generateConstPlayfield,
  56. memory_hideMatchingItems,
  57. memory_selectItem,
  58. ])
  59. def printOutput(c):
  60. if c.recentField.startswith("output"):
  61. print(c.field(c.recentField))
  62. ctrl.registerCallback(printOutput)
  63. ctrl.registerFieldCallback("exit", lambda c: sys.exit(0))
  64. ctrl.set("didLaunch", True)
  65. ctrl.set("playfieldSize", 2)
  66. for line in sys.stdin:
  67. ln = line.rstrip()
  68. ctrl.set("input", ln)