load_file in map.py sets the tiles based on a json file

This commit is contained in:
Cameron Smart
2020-04-18 18:12:16 -07:00
parent 4cad1d5091
commit fcad1beff8
5 changed files with 57 additions and 11 deletions

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,19 @@
{
"elements" : {
"w" : "resources/images/tiles/wall_tile.png",
" " : "resources/images/tiles/floor_tile.png",
"e" : ""
},
"structure" : [
["w", "w", "w", "w", "w", "w", "w", "w", "w", "w"],
["w", " ", " ", " ", " ", " ", " ", " ", " ", "w"],
["w", " ", " ", " ", " ", " ", " ", " ", " ", "w"],
["w", " ", " ", " ", " ", " ", " ", " ", " ", "w"],
["w", " ", " ", " ", " ", " ", " ", " ", " ", "w"],
["w", " ", " ", " ", " ", " ", " ", " ", " ", "w"],
["w", " ", " ", " ", " ", " ", " ", " ", " ", "w"],
["w", " ", " ", " ", " ", " ", " ", " ", " ", "w"],
["w", " ", " ", " ", " ", " ", " ", " ", " ", "w"],
["w", "w", "w", "w", "w", "w", "w", "w", "w", "w"]
]
}