add: tictactoe: mobile support

This commit is contained in:
Namonay
2024-05-13 18:12:23 +02:00
parent deba3bcec1
commit 257a897506
2 changed files with 8 additions and 8 deletions

View File

@ -208,10 +208,10 @@ class TicTacToe
{
this.context.beginPath();
this.context.strokeStyle = "green";
this.context.moveTo(targetX + 15, targetY + 15);
this.context.lineTo(targetX + 45, targetY + 45);
this.context.moveTo(targetX + 45, targetY + 15);
this.context.lineTo(targetX + 15, targetY + 45);
this.context.moveTo(targetX + 10, targetY + 10);
this.context.lineTo(targetX + 40, targetY + 40);
this.context.moveTo(targetX + 40, targetY + 10);
this.context.lineTo(targetX + 10, targetY + 40);
this.context.stroke();
this.context.closePath();
}
@ -221,7 +221,7 @@ class TicTacToe
this.context.strokeStyle = "red";
targetX += this.rectsize / 2;
targetY += this.rectsize / 2;
this.context.arc(targetX, targetY, 20, 0, 2 * Math.PI);
this.context.arc(targetX, targetY, 15, 0, 2 * Math.PI);
this.context.stroke();
this.context.closePath();
}