Return list of empty positions on the board.
(board: np.ndarray)
| 34 | |
| 35 | |
| 36 | def possibilities(board: np.ndarray) -> List[Tuple[int, int]]: |
| 37 | """Return list of empty positions on the board.""" |
| 38 | return [(i, j) for i in range(3) for j in range(3) if board[i, j] == 0] |
| 39 | |
| 40 | |
| 41 | def random_place(board: np.ndarray, player: int) -> np.ndarray: |