diff --git a/web-svelte/src/components/Board.svelte b/web-svelte/src/components/Board.svelte index 282ca68..8956e17 100644 --- a/web-svelte/src/components/Board.svelte +++ b/web-svelte/src/components/Board.svelte @@ -95,18 +95,19 @@ function calculateMidNumber(row: number, col: number) {
- {#each Array(5) as _, r} -
- {#each Array(10) as _, c} + {#each Array(5) as _, row} +
+ {#each Array(10) as _, col} + {@const boardIndex = col + (( row * 10 ) + (1 * row))}
- {#if board[calculateMidNumber(r, c)] != null} + {#if board[boardIndex] != null}
{/if}