Fixed winner being the wrong one ?
This commit is contained in:
parent
7f1b74708b
commit
a18458e8bb
@ -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>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user