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

14 lines
508 B
Python
Raw Normal View History

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