Research portable Memory game | Исследовать портируемую игру Память
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

gui_test.py 816B

5 miesięcy temu
123456789101112131415161718192021222324252627
  1. from gui import *
  2. from gui_TextureDescription import *
  3. from memory_Context import *
  4. def test_gui_generateTextureDescriptions(
  5. ) -> str:
  6. c = memory_createContext()
  7. c.tileImage = "res/img.png"
  8. c.tileImageCount = 3
  9. c.tileImageHeight = 35
  10. c.tileImageWidth = 20
  11. c.recentField = "tileImageWidth"
  12. c = gui_generateTextureDescriptions(c)
  13. if (
  14. c.recentField == "textureDescriptions" and
  15. len(c.textureDescriptions) == 3 and
  16. c.textureDescriptions[0].fileName == "res/img.png" and
  17. c.textureDescriptions[0].height == 35 and
  18. c.textureDescriptions[0].width == 20 and
  19. c.textureDescriptions[0].x == 0 and
  20. c.textureDescriptions[1].x == 20 and
  21. c.textureDescriptions[2].x == 40
  22. ):
  23. return "OK: gui_generateTextureDescriptions"
  24. #}
  25. return "ERR: gui_generateTextureDescriptions"
  26. #}