add: tictactoe: mobile support
This commit is contained in:
parent
deba3bcec1
commit
257a897506
@ -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();
|
||||
}
|
||||
|
@ -10,13 +10,13 @@ export class TicTacToeOnlineView extends AbstractView
|
||||
this.params = params;
|
||||
this.titleKey = titleKey;
|
||||
this.game_id = params.id;
|
||||
this.height = 560;
|
||||
this.width = 560;
|
||||
this.height = 510;
|
||||
this.width = 510;
|
||||
}
|
||||
|
||||
async postInit()
|
||||
{
|
||||
this.Morpion = new TicTacToe(this.height, this.width, 30, 55.5, document.getElementById("Morpion"), this.game_id);
|
||||
this.Morpion = new TicTacToe(this.height, this.width, 30, 50, document.getElementById("Morpion"), this.game_id);
|
||||
this.Morpion.DrawSuperMorpion();
|
||||
await this.Morpion.init();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user