|
|
@ -1,3 +1,4 @@ |
|
|
|
|
|
|
|
import type {} from "typed-query-selector/strict.d.ts"; |
|
|
|
import { BoardgameState } from "../../shared/datatypes/boardgame-state.ts"; |
|
|
|
import { BoardgameState } from "../../shared/datatypes/boardgame-state.ts"; |
|
|
|
import { getTargetGameState } from "../../shared/gameplay/boardgame.ts"; |
|
|
|
import { getTargetGameState } from "../../shared/gameplay/boardgame.ts"; |
|
|
|
import { CurrentOutcome } from "../../shared/datatypes/types.ts"; |
|
|
|
import { CurrentOutcome } from "../../shared/datatypes/types.ts"; |
|
|
@ -46,9 +47,7 @@ export class BoardGameComponent extends HTMLElement { |
|
|
|
this.classList.toggle(className, shouldEnable); |
|
|
|
this.classList.toggle(className, shouldEnable); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.querySelectorAll("tbody.game-board").forEach((tbodyUntyped) => { |
|
|
|
this.querySelectorAll("tbody.game-board").forEach((tbody) => { |
|
|
|
const tbody = tbodyUntyped as HTMLTableSectionElement; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (gameState.rows < tbody.rows.length) { |
|
|
|
while (gameState.rows < tbody.rows.length) { |
|
|
|
tbody.rows[0]?.remove(); |
|
|
|
tbody.rows[0]?.remove(); |
|
|
|
} |
|
|
|
} |
|
|
|