Spaces:
Runtime error
Runtime error
fix keyboard state bug
Browse files
frontend/src/routes/index.svelte
CHANGED
@@ -99,7 +99,7 @@
|
|
99 |
function completeRow() {
|
100 |
const newBoard = [...board];
|
101 |
const currentRow = newBoard[currentRowIndex];
|
102 |
-
const currentletterStates
|
103 |
|
104 |
if (currentRow.every((tile) => tile.letter)) {
|
105 |
const guess = currentRow.map((tile) => tile.letter).join('');
|
@@ -142,7 +142,6 @@
|
|
142 |
if (currentRow.every((tile) => tile.state === LetterState.CORRECT)) {
|
143 |
// yay!
|
144 |
completedPrompts = [...completedPrompts, { prompt: answer, idx: currPromptIndex }];
|
145 |
-
console.log(completedPrompts);
|
146 |
setTimeout(() => {
|
147 |
gameState = GameState.SUCESS;
|
148 |
}, totalTime);
|
@@ -306,7 +305,7 @@
|
|
306 |
transform: scale(-1, 1);
|
307 |
}
|
308 |
.tile.revealed .back {
|
309 |
-
transform: scale(1, 1)
|
310 |
}
|
311 |
|
312 |
@keyframes zoom {
|
|
|
99 |
function completeRow() {
|
100 |
const newBoard = [...board];
|
101 |
const currentRow = newBoard[currentRowIndex];
|
102 |
+
const currentletterStates = { ...letterStates };
|
103 |
|
104 |
if (currentRow.every((tile) => tile.letter)) {
|
105 |
const guess = currentRow.map((tile) => tile.letter).join('');
|
|
|
142 |
if (currentRow.every((tile) => tile.state === LetterState.CORRECT)) {
|
143 |
// yay!
|
144 |
completedPrompts = [...completedPrompts, { prompt: answer, idx: currPromptIndex }];
|
|
|
145 |
setTimeout(() => {
|
146 |
gameState = GameState.SUCESS;
|
147 |
}, totalTime);
|
|
|
305 |
transform: scale(-1, 1);
|
306 |
}
|
307 |
.tile.revealed .back {
|
308 |
+
transform: scale(1, 1);
|
309 |
}
|
310 |
|
311 |
@keyframes zoom {
|