add: tictactoe: security fix
This commit is contained in:
@ -55,6 +55,7 @@ class TicTacToe
|
||||
|
||||
case 'game_move':
|
||||
if (messageData.targetMorpion === undefined || messageData.targetCase === undefined)
|
||||
return ;
|
||||
this.map[messageData.targetMorpion][messageData.targetCase] = (this.sign == "x") ? 1 : 0;
|
||||
this.printSign(messageData.targetMorpion, messageData.targetCase, (this.sign == "x") ? "o" : "x");
|
||||
this.setOutline(this.currentMorpion, false);
|
||||
@ -154,6 +155,7 @@ class TicTacToe
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
onClick(event, morpion)
|
||||
{
|
||||
let x = event.offsetX;
|
||||
|
Reference in New Issue
Block a user