Files
RLD_CT/venv/game_map.py
2019-06-22 22:44:41 -04:00

24 lines
673 B
Python

from map_objects import *
class GameMap:
def __init__(self, width, height):
self.width = width
self.height = height
self.tiles = self.initialize_tiles()
def initialize_tiles(self):
tiles = [[Tile(False) for y in range(self.height)] for x in range(self.width)]
tiles[30][22].blocked = True
tiles[30][22].block_sight = True
tiles[31][22].blocked = True
tiles[31][22].block_sight = True
tiles[32][22].blocked = True
tiles[32][22].block_sight = True
return tiles
def is_blocked(self, x, y):
if self.tiles[x][y].blocked:
return True
return False