Skip to content

Commit 888f4a4

Browse files
committed
Run black on queen.py to fix Flake8 formatting complaint
1 parent b1585ba commit 888f4a4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

72_Queen/python/queen.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ def num_to_loc(num: int) -> Tuple[int, int]:
117117
)
118118

119119
# These are the places that the computer will always try to move into.
120-
COMPUTER_PREF_MOVES: Final[
121-
FrozenSet[Tuple[int, int]]
122-
] = COMPUTER_SAFE_SPOTS | frozenset([WIN_LOC])
120+
COMPUTER_PREF_MOVES: Final[FrozenSet[Tuple[int, int]]] = (
121+
COMPUTER_SAFE_SPOTS | frozenset([WIN_LOC])
122+
)
123123

124124
# These are the locations (not including the win location) from which either player can
125125
# force a win (but the computer will always choose one of the COMPUTER_PREF_MOVES).
@@ -171,10 +171,10 @@ def get_move(current_loc: Optional[Tuple[int, int]]) -> Tuple[int, int]:
171171
"WHERE WOULD YOU LIKE TO START? "
172172
)
173173
elif (
174-
(new_row == row and new_col < col) # move left
175-
or (new_col == col and new_row > row) # move down
176-
or (new_row - row == col - new_col) # move diag left and down
177-
) and (not FIX_BOARD_BUG or (new_col >= 0 and new_row < 8)):
174+
(new_row == row and new_col < col) # move left
175+
or (new_col == col and new_row > row) # move down
176+
or (new_row - row == col - new_col) # move diag left and down
177+
) and (not FIX_BOARD_BUG or (new_col >= 0 and new_row < 8)):
178178
return new_row, new_col
179179
else:
180180
prompt = "Y O U C H E A T . . . TRY AGAIN? "

0 commit comments

Comments
 (0)