trying to fix a few bugs, not a lot! still not figured out the bug

This commit is contained in:
RezHackXYZ 2025-05-04 07:10:22 +05:30
parent 63ac193583
commit 31b546725c
2 changed files with 17 additions and 10 deletions

View file

@ -1,15 +1,15 @@
<script>
<script module>
import { newGame, WordLegnth } from "../logic.svelte.js";
let data = {
3: [20, 7, 8, 2],
4: [10, 20, 15, 30],
5: [12, 18, 25, 30],
6: [15, 25, 35, 40],
7: [20, 30, 40, 50],
8: [25, 35, 45, 55],
9: [30, 40, 50, 60, 5, 54, 54, 43],
10: [35, 45, 55, 65],
3: [],
4: [],
5: [],
6: [],
7: [],
8: [],
9: [],
10: [],
};
let LetersSelected = "5";
@ -50,9 +50,15 @@
});
});
export function SetdataTo(NewData) {
data = NewData;
}
let Avgguesses = (
dataPoints.reduce((acc, val) => acc + val, 0) / dataPoints.length
).toFixed(2);
let TotalWins = dataPoints.length;
</script>

View file

@ -1,6 +1,6 @@
import wordExists from "word-exists";
import { generate } from "random-words";
import { onMount } from "svelte";
import { SetdataTo } from "./InfoAndSetings/stats.svelte";
export let WordLegnth = $state({ v: 5 });
@ -8,6 +8,7 @@ let CorrectWord = generate({
minLength: WordLegnth.v,
maxLength: WordLegnth.v,
});
console.log("CorrectWord: ", CorrectWord);
export let words = $state({ v: [] });
export let CurrentWord = $state({ v: [] });