From 9f4618c5ef618521ce1ab680d82ed9cc941d10d8 Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Mon, 12 Dec 2022 23:00:12 +0100 Subject: Added saving and loading Fix same value for each column Add showing errors --- src/App.svelte | 98 ++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 79 insertions(+), 19 deletions(-) (limited to 'src/App.svelte') diff --git a/src/App.svelte b/src/App.svelte index 9aab903..3a1a685 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,45 +1,99 @@ - +
- {#each {length: 9} as _, i} - {#each {length: 9} as _, j} -
selTile = e.target} + on:click|self={(e) => (selTile = e.target)} data-i={i} data-j={j} - on:keypress={null}>{grid[i][j] === "." ? "" : grid[i][j]}
+ bind:this={tiles[i][j]} + on:keypress={null} + > + {tile === "." ? "" : tile} +
{/each} {/each} + +
-- cgit v1.3.1