readd the demo

This commit is contained in:
randomuser 2022-04-28 20:53:34 -05:00
parent e6d5a89414
commit 764b56a6f2
1 changed files with 32 additions and 0 deletions

32
demo.py Normal file
View File

@ -0,0 +1,32 @@
#!/usr/bin/env python3
from map import *
from render import *
def main():
textures = []
textures.append(Texture("char", "#", "hash"))
textures.append(Texture("mchar", "simple", "simple"))
for i in textures:
i.load()
tiles = []
for i in range(10, 20):
for j in range(2, 8):
t = Tile([i, j], "placeholder")
t.addTexture(textures[0])
tiles.append(t)
t = Tile([23, 2], "placeholder")
t.addTexture(textures[1])
tiles.append(t)
render = Renderer()
[render.addTile(i) for i in tiles]
render.finalRender()
if __name__ == "__main__":
main()