WIP
This commit is contained in:
16
src/main.ts
16
src/main.ts
@@ -3,7 +3,7 @@ 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 { decompressPGN } from "./game/PGNHelpers";
|
||||
|
||||
@@ -19,8 +19,8 @@ const play = async (board: Board, pgn: string | null, interval: number) => {
|
||||
}
|
||||
|
||||
// game.goto(28);
|
||||
// await board.renderTitleScreen(game.getHeader());
|
||||
// await delay(interval);
|
||||
await board.renderTitleScreen(game.getHeader());
|
||||
await delay(interval * 5);
|
||||
await board.render(game.getBoardData());
|
||||
|
||||
while (true) {
|
||||
@@ -50,7 +50,7 @@ const createDownloadLink = async (pgn: string, style: Style) => {
|
||||
console.log(createDownloadLink.name);
|
||||
|
||||
const main = async () => {
|
||||
const style = styles.avocado;
|
||||
const style = styles.lila;
|
||||
|
||||
window.location.hash =
|
||||
"#QiBEdWtlIEthcmwgLyBDb3VudCBJc291YXJkCkQgMTg1OC4/Py4/PwpFIFBhcmlzClIgMS0wClMgUGFyaXMgRlJBClcgUGF1bCBNb3JwaHkKCmU0IGU1IE5mMyBkNiBkNCBCZzQgZHhlNSBCeGYzIFF4ZjMgZHhlNSBCYzQgTmY2IFFiMyBRZTcgTmMzIGM2IEJnNSBiNSBOeGI1IGN4YjUgQnhiNSsgTmJkNyBPLU8tTyBSZDggUnhkNyBSeGQ3IFJkMSBRZTYgQnhkNysgTnhkNyBRYjgrIE54YjggUmQ4Iw==";
|
||||
@@ -63,11 +63,11 @@ const main = async () => {
|
||||
|
||||
console.log(pgn);
|
||||
|
||||
play(board, pgn, 1000);
|
||||
play(board, pgns[2], 1000);
|
||||
|
||||
// createDownloadLink(pgns[0], style).then((link) => {
|
||||
// document.body.appendChild(link);
|
||||
// });
|
||||
createDownloadLink(pgns[2], style).then((link) => {
|
||||
document.body.appendChild(link);
|
||||
});
|
||||
};
|
||||
|
||||
main();
|
||||
|
||||
Reference in New Issue
Block a user