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

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