← 返回 databricks 的题目列表Customizable MxN Tic Tac Toe Game with Win Detection
类型:online_judge
databricks
Design a Tic Tac Toe game for an M x N board.
Functional Requirements
move(row: int, col: int, player: int) -> int: Record a player's move, and return the winner if there is one. If no player has won, return 0.
Data Scale
The board size M and N are positive integers greater than 3.
For each move method call, assume row and col are always within valid range.
Note: The implementation should consider the possibility to change the winning condition, allowing players to customize the number of consecutive marks required to win.
Example
Input
3 3 1 1 2 2