Skip to content

Commit 88476d8

Browse files
committed
Fix exception syntax
1 parent 433998c commit 88476d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backtracking/minimax.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def minimax_ttt(board: Board, depth: int, is_maximising: bool) -> int:
196196
197197
Parameters
198198
----------
199-
board : 3×3 grid; cells are '_', 'X', or 'O'.
199+
board : 3X3 grid; cells are '_', 'X', or 'O'.
200200
depth : Remaining search depth (used to prefer shorter wins).
201201
is_maximising : True when it is the AI's (X's) turn.
202202
@@ -280,7 +280,7 @@ def _play_game() -> None:
280280
try:
281281
raw = input("Your move (row col): ").strip().split()
282282
r, c = int(raw[0]), int(raw[1])
283-
except ValueError, IndexError:
283+
except (ValueError, IndexError):
284284
print("Invalid input. Try again.")
285285
continue
286286
if not (0 <= r < 3 and 0 <= c < 3) or board[r][c] != _EMPTY:

0 commit comments

Comments
 (0)