From 2214e73ad4c44be6fa25ba1a23f67a501c7908f3 Mon Sep 17 00:00:00 2001 From: Maciej Caderek Date: Mon, 17 Jan 2022 05:27:14 +0100 Subject: [PATCH] WIP --- src/board/Board.ts | 4 ++-- src/main.ts | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/board/Board.ts b/src/board/Board.ts index 19f22e0..91edc60 100644 --- a/src/board/Board.ts +++ b/src/board/Board.ts @@ -92,6 +92,7 @@ class Board { } async renderTitleScreen(header: { [key: string]: string | undefined }) { + console.log(header); this.tempCtx.clearRect(0, 0, this.size, this.size); await drawSquare(this.tempCtx, this.size, 0, 0, this.style.border); @@ -101,8 +102,7 @@ class Board { async render(boardData: BoardData | null, move: Move | null = null) { this.lastMove = move; this.boardData = boardData; - const { background, dark, light, moveIndicator, border, coords } = - this.style; + const { background, dark, light, border, coords } = this.style; const hasBorder = border && this.borderVisible; const tempBorderWidth = hasBorder ? this.size / 32 : 0; diff --git a/src/main.ts b/src/main.ts index 0fc340b..c921f42 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,9 +3,9 @@ import "./style.css"; import Board from "./board/Board"; import styles from "./board/styles-board"; import Game from "./game/Game"; -import pgns from "./test-data/pgns"; +// import pgns from "./test-data/pgns"; import createSimpleGIF from "./gif/createSimpleGIF"; -import { compressPGN, decompressPGN } from "./game/PGNHelpers"; +import { decompressPGN } from "./game/PGNHelpers"; const $app = document.querySelector("#app"); @@ -47,8 +47,10 @@ const createDownloadLink = async (pgn: string, style: Style) => { return link; }; +console.log(createDownloadLink.name); + const main = async () => { - const style = styles.calm; + const style = styles.avocado; window.location.hash = "#QiBEdWtlIEthcmwgLyBDb3VudCBJc291YXJkCkQgMTg1OC4/Py4/PwpFIFBhcmlzClIgMS0wClMgUGFyaXMgRlJBClcgUGF1bCBNb3JwaHkKCmU0IGU1IE5mMyBkNiBkNCBCZzQgZHhlNSBCeGYzIFF4ZjMgZHhlNSBCYzQgTmY2IFFiMyBRZTcgTmMzIGM2IEJnNSBiNSBOeGI1IGN4YjUgQnhiNSsgTmJkNyBPLU8tTyBSZDggUnhkNyBSeGQ3IFJkMSBRZTYgQnhkNysgTnhkNyBRYjgrIE54YjggUmQ4Iw==";