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.

27 lines
754B

  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()