From 69117c3526d9c03b285f5f81acb669d7766bf9db Mon Sep 17 00:00:00 2001 From: Khaled Date: Wed, 7 Feb 2024 10:19:23 +0600 Subject: [PATCH] Fix linting --- src/lib/components/Board/Board.svelte | 9 ++++----- src/routes/game/+page.svelte | 17 ++++++++++------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/lib/components/Board/Board.svelte b/src/lib/components/Board/Board.svelte index 7504586..68e67db 100644 --- a/src/lib/components/Board/Board.svelte +++ b/src/lib/components/Board/Board.svelte @@ -49,7 +49,7 @@ // Loop around single row with right and left arrows case 'ArrowRight': - while (true) { + while (nextCol != width) { if (nextCol == width) { nextCol--; break; @@ -61,7 +61,7 @@ break; case 'ArrowLeft': - while (true) { + while (prevCol + 1 != 0) { if (prevCol + 1 == 0) { prevCol++; break; @@ -74,7 +74,7 @@ // loop around single column with up and down arrows case 'ArrowUp': - while (true) { + while (prevRow + 1 != 0) { if (prevRow + 1 == 0) { prevRow++; break; @@ -86,7 +86,7 @@ break; case 'ArrowDown': - while (true) { + while (nextRow != height) { if (nextRow == height) { nextRow--; break; @@ -155,7 +155,6 @@ }); - { + calculateInputScore(data.boardData, data.submitRow, data.submitColumn, existingWords).then( + (result) => { playerScores[data.submittedPlayerId].score += result.score; playerScores[data.submittedPlayerId].words.push(...result.words); + //TODO Visualize scores - }) - .catch((err) => { - //TODO - console.log(err); - }); + // for (const word in result.words) { + // } + } + ); } function handleGameOver(): void { @@ -97,6 +98,8 @@ /> + +