asciigame/demo.py

33 lines
645 B
Python
Raw Normal View History

2022-04-28 06:54:28 -05:00
#!/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()