Research portable Memory game | Исследовать портируемую игру Память
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

main-gui.py 3.2KB

3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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_SequentialTimer import *
  9. from desktop_Window import *
  10. from gui import *
  11. from gui_aux_test import *
  12. from gui_test import *
  13. from llm_test import *
  14. from llm_test_Python import *
  15. from memory_test import *
  16. import sys
  17. print(ctx_test_Controller_executeFunctions_registerFunction_set())
  18. print(ctx_test_Controller_processQueue())
  19. print(ctx_test_Controller_registerFieldCallback_match())
  20. print(ctx_test_Controller_registerFieldCallback_mismatch())
  21. print(ctx_test_memoryContext_field())
  22. print(ctx_test_memoryContext_setField())
  23. print(llm_test_Python_copyByValue())
  24. print(llm_test_isDigit_digit())
  25. print(llm_test_isDigit_notDigit())
  26. print(llm_test_strToInt())
  27. print(memory_test_detectMismatchedItems())
  28. print(memory_test_detectMismatchedItems_itemTwice())
  29. print(memory_test_detectVictory())
  30. print(memory_test_generateConstPlayfield())
  31. print(memory_test_hideMatchingItems())
  32. print(memory_test_selectItem_1x())
  33. print(memory_test_selectItem_2x())
  34. print(memory_test_selectItem_3x())
  35. print(cli_test_exit_e())
  36. print(cli_test_exit_exit())
  37. print(cli_test_exit_victory())
  38. print(cli_test_exit_q())
  39. print(cli_test_exit_quit())
  40. print(cli_test_goOn())
  41. print(cli_test_greetUser())
  42. print(cli_test_showHelp_h())
  43. print(cli_test_showHelp_help())
  44. print(cli_test_selectItem())
  45. print(cli_test_promptSecondItemSelection())
  46. print(cli_test_reportMatchedItems())
  47. print(cli_test_reportMismatchedItems())
  48. print(cli_test_reportVictory())
  49. print(test_gui_aux_cellPositions())
  50. print(test_gui_generateTextureDescriptions())
  51. print(test_gui_generateTilePositions())
  52. ctrl = ctx_Controller(memory_createContext())
  53. ctrl.registerFunctions([
  54. # cli_exit,
  55. # cli_goOn,
  56. # cli_greetUser,
  57. # cli_promptSecondItemSelection,
  58. # cli_reportMatchedItems,
  59. # cli_reportMismatchedItems,
  60. # cli_reportVictory,
  61. # cli_selectItem,
  62. # cli_showHelp,
  63. gui_generateTextureDescriptions,
  64. gui_generateTilePositions,
  65. memory_detectMismatchedItems,
  66. memory_detectVictory,
  67. memory_generateConstPlayfield,
  68. memory_hideMatchingItems,
  69. memory_selectItem,
  70. ])
  71. def printOutput(c):
  72. if c.recentField.startswith("output"):
  73. print(c.field(c.recentField))
  74. ctrl.registerCallback(printOutput)
  75. ctrl.registerFieldCallback("exit", lambda c: sys.exit(0))
  76. p = desktop_Platform()
  77. p.ctrl = ctrl
  78. p.sequentialTimer = desktop_SequentialTimer()
  79. p.sequentialTimer.ctrl = ctrl
  80. # Copy context to platform.
  81. # And process lots of functions that are interested in changes.
  82. def process(c):
  83. p.c = c
  84. desktop_displaySelectedTile(p)
  85. desktop_hideMatchingTiles(p)
  86. desktop_scheduleHidingOfMatchingTiles(p)
  87. ctrl.registerCallback(process)
  88. ctrl.set("didLaunch", True)
  89. ctrl.set("playfieldSize", 2)
  90. ctrl.set("cellSize", 25)
  91. ctrl.set("hideMatchingTilesDelay", 500)
  92. ctrl.set("tileImage", "res/tiles.png")
  93. ctrl.set("tileImageCount", 3)
  94. ctrl.set("tileImageHeight", 100)
  95. ctrl.set("tileImageWidth", 75)
  96. ctrl.set("windowWidth", 900)
  97. ctrl.set("windowHeight", 600)
  98. ctrl.set("windowAntialiasing", False)
  99. ctrl.set("windowBackgroundColor", "#ffffff")
  100. ctrl.set("windowTitle", "OGS Memory")
  101. desktop_loadTextures(p)
  102. desktop_createDeselectedTiles(p)
  103. desktop_createSelectedTiles(p)
  104. wnd = desktop_Window(p)
  105. arcade.run()