fix: fix tic-tac-toe test
This commit is contained in:
@@ -125,8 +125,8 @@ export function createTurnRule() {
|
||||
const playCmd = received as Command;
|
||||
if (playCmd.name !== 'play') continue;
|
||||
|
||||
const row = playCmd.params[1] as number;
|
||||
const col = playCmd.params[2] as number;
|
||||
const row = Number(playCmd.params[1]);
|
||||
const col = Number(playCmd.params[2]);
|
||||
|
||||
if (isNaN(row) || isNaN(col) || row < 0 || row > 2 || col < 0 || col > 2) continue;
|
||||
if (isCellOccupied(this, row, col)) continue;
|
||||
|
||||
Reference in New Issue
Block a user