Fixed winner being the wrong one ?

This commit is contained in:
Namonay 2024-02-25 00:18:27 +01:00 committed by AdrienLSH
parent d56b367c45
commit d814363b36

View File

@ -129,7 +129,7 @@ export default class extends AbstractView
morpion.ctx.closePath(); morpion.ctx.closePath();
morpion.ctx.beginPath(); morpion.ctx.beginPath();
morpion.ctx.fillStyle = "black"; morpion.ctx.fillStyle = "black";
morpion.ctx.fillText((morpion.Winner) ? "Winner is : X" : "Winner is : O", morpion.width / 2 - 30, morpion.height - morpion.gap / 2, 140); morpion.ctx.fillText((morpion.Winner) ? "Winner is : O" : "Winner is : X", morpion.width / 2 - 30, morpion.height - morpion.gap / 2, 140);
morpion.ctx.closePath(); morpion.ctx.closePath();
} }
@ -246,6 +246,7 @@ export default class extends AbstractView
return ` return `
<h1>${lang.get('ticTacToe')}</h1> <h1>${lang.get('ticTacToe')}</h1>
<canvas id="Morpion" width="${this.width}" height="${this.height}"></canvas> <canvas id="Morpion" width="${this.width}" height="${this.height}"></canvas>
<h2>J'arrive pas a ecrire du html a droite 🤓🤓🤓🤓</h2>
`; `;
} }
} }