refactor: prompt def udpate

This commit is contained in:
2026-04-06 16:20:52 +08:00
parent bf20e53c6b
commit 20f722818d
7 changed files with 34 additions and 36 deletions
+1 -2
View File
@@ -61,8 +61,7 @@ export class GameScene extends GameHostScene<TicTacToeState> {
if (this.state.winner) return;
if (this.isCellOccupied(row, col)) return;
const cmd = prompts.play(this.state.currentPlayer, row, col);
const error = this.gameHost.onInput(cmd);
const error = this.gameHost.tryAnswerPrompt(prompts.play, this.state.currentPlayer, row, col);
if (error) {
console.warn('Invalid move:', error);
}