1
# Runtime: 82 ms (Top 35.62%) | Memory: 14 MB (Top 54.79%)4
self, board: List[List[str]], rMove: int, cMove: int, color: str6
directions = [False] * 87
moves = [(1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)]8
opposite_color = "W" if color == "B" else "B"11
r, c = rMove + moves[d][0], cMove + moves[d][1]12
if 0 <= r < 8 and 0 <= c < 8 and board[r][c] == opposite_color:15
for step in range(2, 8):16
if not any(d for d in directions):20
r, c = rMove + step * moves[d][0], cMove + step * moves[d][1]21
if 0 <= r < 8 and 0 <= c < 8:22
if board[r][c] == color:24
elif board[r][c] == ".":