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.

memory_Context.py 2.1KB

5 months ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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.displayEndingSplashScreen = False
  15. self.exit = False
  16. self.hiddenItems = []
  17. self.hideBeginningSplashScreen = False
  18. self.hideMatchingTiles = False
  19. self.hideMatchingTilesDelay = 0
  20. self.input = ""
  21. self.mismatchedItems = []
  22. self.outputGoOn = ""
  23. self.outputGreeting = ""
  24. self.outputHelp = ""
  25. self.outputMatchedItems = ""
  26. self.outputMismatchedItems = ""
  27. self.outputPromptSelection = ""
  28. self.outputVictory = ""
  29. self.playfieldItems = {}
  30. self.playfieldSize = 0
  31. self.recentField = "none"
  32. self.selectedId = -1
  33. self.selectedItems = []
  34. self.splashBeginTimeout = 0
  35. self.splashEndDelay = 0
  36. self.splashImage = ""
  37. self.splashImageCount = 0
  38. self.splashImageHeight = 0
  39. self.splashImageWidth = 0
  40. self.textureDescriptions = []
  41. self.tileImage = ""
  42. self.tileImageCount = 0
  43. self.tileImageHeight = 0
  44. self.tileImageWidth = 0
  45. self.tilePositions = []
  46. self.titleImage = ""
  47. self.titleImageCount = 0
  48. self.titleImageHeight = 0
  49. self.titleImageWidth = 0
  50. self.titlePosition = []
  51. self.titleTextureDescriptions = []
  52. self.windowBackgroundColor = "#000000"
  53. self.windowHeight = 0
  54. self.windowTitle = ""
  55. self.windowWidth = 0
  56. self.victory = False
  57. def field(self, fieldName):
  58. return getattr(self, fieldName)
  59. def setField(self, fieldName, value):
  60. setattr(self, fieldName, value)
  61. def __repr__(self):
  62. return self.__str__()
  63. def __str__(self):
  64. return f"memory_Context(playfieldI/playfieldS/recentF/selectedId/selectedI: '{self.playfieldItems}'/'{self.playfieldSize}'/'{self.recentField}'/'{self.selectedId}'/'{self.selectedItems}')"
  65. def memory_createContext():
  66. return memory_Context()