File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -68,11 +68,11 @@ def successors(self, ml: MazeLocation) -> List[MazeLocation]:
6868 locations : List [MazeLocation ] = []
6969 if ml .row + 1 < self ._rows and self ._grid [ml .row + 1 ][ml .column ] != Cell .BLOCKED :
7070 locations .append (MazeLocation (ml .row + 1 , ml .column ))
71- if ml .row - 1 > 0 and self ._grid [ml .row - 1 ][ml .column ] != Cell .BLOCKED :
71+ if ml .row - 1 >= 0 and self ._grid [ml .row - 1 ][ml .column ] != Cell .BLOCKED :
7272 locations .append (MazeLocation (ml .row - 1 , ml .column ))
7373 if ml .column + 1 < self ._columns and self ._grid [ml .row ][ml .column + 1 ] != Cell .BLOCKED :
7474 locations .append (MazeLocation (ml .row , ml .column + 1 ))
75- if ml .column - 1 > 0 and self ._grid [ml .row ][ml .column - 1 ] != Cell .BLOCKED :
75+ if ml .column - 1 >= 0 and self ._grid [ml .row ][ml .column - 1 ] != Cell .BLOCKED :
7676 locations .append (MazeLocation (ml .row , ml .column - 1 ))
7777 return locations
7878
You can’t perform that action at this time.
0 commit comments