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.

79 lines
2.1KB

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