2026-rff_mp/MusinAA/task2/mazeObjects/cell.py

14 lines
508 B
Python
Raw Normal View History

2026-04-24 03:14:07 +00:00
class Cell:
"""Хранит координаты (x, y)
флаги isWall, isStart, isExit
метод isPassable() (возвращает True для прохода, если не стена)."""
2026-04-27 22:11:11 +00:00
def __init__(self, x: int = 0, y: int = 0, isWall:bool = False, isStart:bool = False, isExit:bool = False):
2026-04-24 03:14:07 +00:00
self.x = x
self.y = y
self.isWall = isWall
self.isStart = isStart
self.isExit = isExit
def isPassable(self):
return not self.isWall