From 44ff6231441024d16fddc2b7cb648539522b04cb Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Mon, 19 Dec 2022 21:04:23 +0100 Subject: v1.0.0 Added everything that's in the spec --- src/App.svelte | 268 +++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 240 insertions(+), 28 deletions(-) (limited to 'src/App.svelte') diff --git a/src/App.svelte b/src/App.svelte index 3a1a685..104a981 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,41 +1,63 @@
+
+ + +
{#each grid as row, i} {#each row as tile, j} @@ -81,22 +165,74 @@ class="tile" class:br={j % 3 === 2 && j !== 8} class:bb={i % 3 === 2 && i !== 8} - on:click|self={(e) => (selTile = e.target)} + on:click|self={(e) => setSelTile(e.target, i, j)} data-i={i} data-j={j} bind:this={tiles[i][j]} on:keypress={null} > {tile === "." ? "" : tile} + + + + + + + + +
{/each} {/each} - - +
+ +
+ + +
+ {#each { length: 9 } as _, i} +
+ {i + 1} +
+ {/each} +
+
+
-- cgit v1.3.1