import { lang } from "../index.js"; import { TicTacToe } from "../api/game/tictactoe/TicTacToeGame.js" import AbstractAuthenticatedView from "./abstracts/AbstractAuthenticatedView.js"; import { navigateTo } from "../index.js" export class TicTacToeOnlineView extends AbstractAuthenticatedView { constructor(params, titleKey) { super(params, 'ticTacToeTitle'); this.params = params; this.titleKey = titleKey; this.game_id = params.id; this.height = 510; this.width = 510; } async postInit() { this.Morpion = new TicTacToe(this.height, this.width, 30, 50, document.getElementById("Morpion"), this.game_id); this.Morpion.DrawSuperMorpion(); await this.Morpion.init(); } async leavePage() { this.Morpion.uninit(); } setTitle() { document.title = lang.get(this.titleKey, this.titleKey); } async getHtml() { return `