Research portable Memory game | Исследовать портируемую игру Память
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

68 rindas
1.7KB

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