Research portable Memory game | Исследовать портируемую игру Память
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

98 líneas
2.5KB

  1. import arcade
  2. from cli import *
  3. from cli_test import *
  4. from ctx import *
  5. from ctx_test2 import *
  6. from desktop import *
  7. from desktop_Platform import *
  8. from desktop_Window import *
  9. from gui import *
  10. from gui_test import *
  11. from llm_test import *
  12. from llm_test_Python import *
  13. from memory_test import *
  14. import sys
  15. print(ctx_test_Controller_executeFunctions_registerFunction_set())
  16. print(ctx_test_Controller_processQueue())
  17. print(ctx_test_Controller_registerFieldCallback_match())
  18. print(ctx_test_Controller_registerFieldCallback_mismatch())
  19. print(ctx_test_memoryContext_field())
  20. print(ctx_test_memoryContext_setField())
  21. print(llm_test_Python_copyByValue())
  22. print(llm_test_isDigit_digit())
  23. print(llm_test_isDigit_notDigit())
  24. print(llm_test_strToInt())
  25. print(memory_test_detectMismatchedItems())
  26. print(memory_test_detectMismatchedItems_itemTwice())
  27. print(memory_test_detectVictory())
  28. print(memory_test_generateConstPlayfield())
  29. print(memory_test_hideMatchingItems())
  30. print(memory_test_selectItem_1x())
  31. print(memory_test_selectItem_2x())
  32. print(memory_test_selectItem_3x())
  33. print(cli_test_exit_e())
  34. print(cli_test_exit_exit())
  35. print(cli_test_exit_victory())
  36. print(cli_test_exit_q())
  37. print(cli_test_exit_quit())
  38. print(cli_test_goOn())
  39. print(cli_test_greetUser())
  40. print(cli_test_showHelp_h())
  41. print(cli_test_showHelp_help())
  42. print(cli_test_selectItem())
  43. print(cli_test_promptSecondItemSelection())
  44. print(cli_test_reportMatchedItems())
  45. print(cli_test_reportMismatchedItems())
  46. print(cli_test_reportVictory())
  47. print(test_gui_generateTextureDescriptions())
  48. ctrl = ctx_Controller(memory_createContext())
  49. ctrl.registerFunctions([
  50. # cli_exit,
  51. # cli_goOn,
  52. # cli_greetUser,
  53. # cli_promptSecondItemSelection,
  54. # cli_reportMatchedItems,
  55. # cli_reportMismatchedItems,
  56. # cli_reportVictory,
  57. # cli_selectItem,
  58. # cli_showHelp,
  59. gui_generateTextureDescriptions,
  60. memory_detectMismatchedItems,
  61. memory_detectVictory,
  62. memory_generateConstPlayfield,
  63. memory_hideMatchingItems,
  64. memory_selectItem,
  65. ])
  66. def printOutput(c):
  67. if c.recentField.startswith("output"):
  68. print(c.field(c.recentField))
  69. ctrl.registerCallback(printOutput)
  70. ctrl.registerFieldCallback("exit", lambda c: sys.exit(0))
  71. p = desktop_Platform()
  72. # Copy context to platform.
  73. def copyContext(c):
  74. p.c = c
  75. ctrl.registerCallback(copyContext)
  76. ctrl.set("didLaunch", True)
  77. ctrl.set("playfieldSize", 2)
  78. ctrl.set("tileImage", "res/tiles.png")
  79. ctrl.set("tileImageCount", 3)
  80. ctrl.set("tileImageHeight", 100)
  81. ctrl.set("tileImageWidth", 75)
  82. desktop_configureFixedWindow(p)
  83. desktop_loadTextures(p)
  84. wnd = desktop_Window(p)
  85. arcade.run()