Place player number randomly on an empty position.
(board: np.ndarray, player: int)
| 39 | |
| 40 | |
| 41 | def random_place(board: np.ndarray, player: int) -> np.ndarray: |
| 42 | """Place player number randomly on an empty position.""" |
| 43 | selection = possibilities(board) |
| 44 | current_loc = random.choice(selection) |
| 45 | board[current_loc] = player |
| 46 | return board |
| 47 | |
| 48 | |
| 49 | def row_win(board: np.ndarray, player: int) -> bool: |
no test coverage detected