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.

69 lines
2.0KB

  1. class memory_Context:
  2. def __init__(self):
  3. self.cellPositions = []
  4. self.cellSize = 0
  5. self.descImage = ""
  6. self.descImageCount = 0
  7. self.descImageHeight = 0
  8. self.descImageWidth = 0
  9. self.descPosition = []
  10. self.descTextureDescriptions = []
  11. self.deselectMismatchedTiles = False
  12. self.deselectMismatchedTilesDelay = 0
  13. self.didLaunch = False
  14. self.exit = False
  15. self.hiddenItems = []
  16. self.hideMatchingTiles = False
  17. self.hideMatchingTilesDelay = 0
  18. self.input = ""
  19. self.mismatchedItems = []
  20. self.outputGoOn = ""
  21. self.outputGreeting = ""
  22. self.outputHelp = ""
  23. self.outputMatchedItems = ""
  24. self.outputMismatchedItems = ""
  25. self.outputPromptSelection = ""
  26. self.outputVictory = ""
  27. self.playfieldItems = {}
  28. self.playfieldSize = 0
  29. self.recentField = "none"
  30. self.selectedId = -1
  31. self.selectedItems = []
  32. self.splashBeginTimeout = 2000
  33. self.splashImage = ""
  34. self.splashImageCount = 0
  35. self.splashImageHeight = 0
  36. self.splashImageWidth = 0
  37. self.textureDescriptions = []
  38. self.tileImage = ""
  39. self.tileImageCount = 0
  40. self.tileImageHeight = 0
  41. self.tileImageWidth = 0
  42. self.tilePositions = []
  43. self.titleImage = ""
  44. self.titleImageCount = 0
  45. self.titleImageHeight = 0
  46. self.titleImageWidth = 0
  47. self.titlePosition = []
  48. self.titleTextureDescriptions = []
  49. self.windowBackgroundColor = "#000000"
  50. self.windowHeight = 0
  51. self.windowTitle = ""
  52. self.windowWidth = 0
  53. self.victory = False
  54. def field(self, fieldName):
  55. return getattr(self, fieldName)
  56. def setField(self, fieldName, value):
  57. setattr(self, fieldName, value)
  58. def __repr__(self):
  59. return self.__str__()
  60. def __str__(self):
  61. return f"memory_Context(playfieldI/playfieldS/recentF/selectedId/selectedI: '{self.playfieldItems}'/'{self.playfieldSize}'/'{self.recentField}'/'{self.selectedId}'/'{self.selectedItems}')"
  62. def memory_createContext():
  63. return memory_Context()