fix: matchmaking: QOL and typos
This commit is contained in:
parent
73828bbd8e
commit
821d4b9154
@ -90,14 +90,24 @@ class TicTacToe
|
|||||||
this.context.fillRect(this.width / 2 - 200, this.height - this.gap + 10, 400, 80);
|
this.context.fillRect(this.width / 2 - 200, this.height - this.gap + 10, 400, 80);
|
||||||
this.context.closePath();
|
this.context.closePath();
|
||||||
this.context.beginPath();
|
this.context.beginPath();
|
||||||
|
this.context.font = `20px sans-serif`;
|
||||||
this.context.fillStyle = (winning_sign == "o") ? "red" : "green";
|
this.context.fillStyle = (winning_sign == "o") ? "red" : "green";
|
||||||
this.context.fillText((winning_sign == "o") ? lang.get("morpionWin") + "O" : lang.get("morpionWin") + "X", this.width / 2 - 30, this.height - this.gap / 2, 140);
|
this.context.fillText((winning_sign == "o") ? lang.get("morpionWin") + "O" : lang.get("morpionWin") + "X", this.width / 2 - 85, this.height - this.gap / 2 + 10, 180);
|
||||||
}
|
}
|
||||||
|
|
||||||
printTimer()
|
printTimer()
|
||||||
{
|
{
|
||||||
let sec = 20;
|
let sec = 20;
|
||||||
let turn = this.turn
|
let turn = this.turn
|
||||||
|
if (this.turn)
|
||||||
|
{
|
||||||
|
this.context.beginPath();
|
||||||
|
this.context.fillStyle = "white";
|
||||||
|
this.context.font = `40px Verdana`;
|
||||||
|
this.context.fillText(sec, this.width / 2, this.gap / 2);
|
||||||
|
this.context.closePath();
|
||||||
|
sec--;
|
||||||
|
}
|
||||||
let id = setInterval(() =>
|
let id = setInterval(() =>
|
||||||
{
|
{
|
||||||
this.context.beginPath();
|
this.context.beginPath();
|
||||||
@ -117,7 +127,6 @@ class TicTacToe
|
|||||||
this.context.fillStyle = "white";
|
this.context.fillStyle = "white";
|
||||||
this.context.font = `40px Verdana`;
|
this.context.font = `40px Verdana`;
|
||||||
this.context.fillText(sec, this.width / 2, this.gap / 2);
|
this.context.fillText(sec, this.width / 2, this.gap / 2);
|
||||||
this.context.font = `inherit`;
|
|
||||||
this.context.closePath();
|
this.context.closePath();
|
||||||
}
|
}
|
||||||
sec--;
|
sec--;
|
||||||
|
Loading…
Reference in New Issue
Block a user