fix: fix tic-tac-toe test

This commit is contained in:
2026-04-02 00:01:45 +08:00
parent b33c901c11
commit a8ff79e4e5
2 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -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;