def display_potential_tile(self, color, x, y): # display tiles potentially can be placed for point in self.get_legal_move_list(color): index_x = x // self.cb.space index_y = y // self.cb.space new_x = index_x * self.cb.space + self.cb.space / 2 new_y = index_y * self.cb.space + self.cb.space / 2 if index_x == point[1] and index_y == point[0]: potential = Tile(self.cb, 'grey') potential.display(new_x, new_y)
def generate_map(self): """Generate the main map""" way = Tile("images/way.png") wall = Tile("images/wall.png") ordo = 0 for x in Main.maplist: absc = 0 for y in list(x): if y == "M" or y == "G" or y == " " or y == "A": way.set_pos(absc, ordo) way.display() elif y == "D": Main.lava.set_pos(absc, ordo) Main.lava.display() elif y == "#": wall.set_pos(absc, ordo) wall.display() absc += 40 ordo += 40