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.

84 lines
2.2KB

  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. import sys
  12. print(ctx_test_Controller_executeFunctions_registerFunction_set())
  13. print(ctx_test_Controller_processQueue())
  14. print(ctx_test_Controller_registerFieldCallback_match())
  15. print(ctx_test_Controller_registerFieldCallback_mismatch())
  16. print(ctx_test_memoryContext_field())
  17. print(ctx_test_memoryContext_setField())
  18. print(llm_test_Python_copyByValue())
  19. print(llm_test_isDigit_digit())
  20. print(llm_test_isDigit_notDigit())
  21. print(llm_test_strToInt())
  22. print(memory_test_detectMismatchedItems())
  23. print(memory_test_detectMismatchedItems_itemTwice())
  24. print(memory_test_detectVictory())
  25. print(memory_test_generateConstPlayfield())
  26. print(memory_test_hideMatchingItems())
  27. print(memory_test_selectItem_1x())
  28. print(memory_test_selectItem_2x())
  29. print(memory_test_selectItem_3x())
  30. print(cli_test_exit_e())
  31. print(cli_test_exit_exit())
  32. print(cli_test_exit_victory())
  33. print(cli_test_exit_q())
  34. print(cli_test_exit_quit())
  35. print(cli_test_goOn())
  36. print(cli_test_greetUser())
  37. print(cli_test_showHelp_h())
  38. print(cli_test_showHelp_help())
  39. print(cli_test_selectItem())
  40. print(cli_test_promptSecondItemSelection())
  41. print(cli_test_reportMatchedItems())
  42. print(cli_test_reportMismatchedItems())
  43. print(cli_test_reportVictory())
  44. ctrl = ctx_Controller(memory_createContext())
  45. ctrl.registerFunctions([
  46. cli_exit,
  47. cli_goOn,
  48. cli_greetUser,
  49. cli_promptSecondItemSelection,
  50. cli_reportMatchedItems,
  51. cli_reportMismatchedItems,
  52. cli_reportVictory,
  53. cli_selectItem,
  54. cli_showHelp,
  55. memory_detectMismatchedItems,
  56. memory_detectVictory,
  57. memory_generateConstPlayfield,
  58. memory_hideMatchingItems,
  59. memory_selectItem,
  60. ])
  61. def printOutput(c):
  62. if c.recentField.startswith("output"):
  63. print(c.field(c.recentField))
  64. ctrl.registerCallback(printOutput)
  65. ctrl.registerFieldCallback("exit", lambda c: sys.exit(0))
  66. ctrl.set("didLaunch", True)
  67. ctrl.set("playfieldSize", 2)
  68. arcade.open_window(800, 600, "Hello, Arcade Memory")
  69. arcade.set_background_color(arcade.color.WHITE)
  70. arcade.start_render()
  71. arcade.draw_circle_filled(400, 300, 15, arcade.color.BLUE)
  72. arcade.finish_render()
  73. arcade.run()