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 754B

7 months ago
7 months ago
7 months ago
7 months ago
1234567891011121314151617181920212223242526
  1. class memory_Context:
  2. def __init__(self):
  3. self.didLaunch = False
  4. self.hiddenItems = []
  5. self.input = ""
  6. self.mismatchedItems = []
  7. self.outputGreeting = ""
  8. self.outputHelp = ""
  9. self.outputMatchedItems = ""
  10. self.outputMismatchedItems = ""
  11. self.playfieldItems = {}
  12. self.playfieldSize = 0
  13. self.recentField = "none"
  14. self.selectedId = -1
  15. self.selectedItems = []
  16. self.victory = False
  17. def __repr__(self):
  18. return self.__str__()
  19. def __str__(self):
  20. return f"memory_Context(playfieldI/playfieldS/recentF/selectedId/selectedI: '{self.playfieldItems}'/'{self.playfieldSize}'/'{self.recentField}'/'{self.selectedId}'/'{self.selectedItems}')"
  21. def memory_createContext():
  22. return memory_Context()