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.

28 lines
816B

  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. #}