Skip to content

Commit 3fe0feb

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent cfea3be commit 3fe0feb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: graphs/greedy_best_first.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ def get_successors(self, parent: Node) -> list[Node]:
136136
pos_x = parent.pos_x + action[1]
137137
pos_y = parent.pos_y + action[0]
138138

139-
if 0 <= pos_x <= len(grid[0]) - 1 and 0 <= pos_y <= len(grid) - 1 and grid[pos_y][pos_x] == 0:
139+
if (
140+
0 <= pos_x <= len(grid[0]) - 1
141+
and 0 <= pos_y <= len(grid) - 1
142+
and grid[pos_y][pos_x] == 0
143+
):
140144
successors.append(
141145
Node(
142146
pos_x,

0 commit comments

Comments
 (0)