refactor: prompt def udpate
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user