diff --git a/src/games/sub-cores/MinimalPairsGame.tsx b/src/games/sub-cores/MinimalPairsGame.tsx index f40ce5e..9465e31 100644 --- a/src/games/sub-cores/MinimalPairsGame.tsx +++ b/src/games/sub-cores/MinimalPairsGame.tsx @@ -36,6 +36,7 @@ export default function MinimalPairsGame({ minimalPairs.find((x) => x.title === level)?.pairs || [] ); function getQuestion(): Question { + console.log("getting question"); const pair = getPair(); const selected: 0 | 1 = randFromArray([0, 1]); return { pair, selected }; diff --git a/src/lib/pool.tsx b/src/lib/pool.tsx index caee1f6..c919e17 100644 --- a/src/lib/pool.tsx +++ b/src/lib/pool.tsx @@ -13,9 +13,7 @@ export function makePool
(poolBase: P[], removalLaxity = 0): () => P { let pool = [...poolBase]; function shouldStillKeepIt() { if (!removalLaxity) return false; - const r = Math.random() < removalLaxity / 100; - console.log({ r }); - return r; + return Math.random() < removalLaxity / 100; } function pickRandomFromPool(): P { // Pick an item from the pool; @@ -26,6 +24,7 @@ export function makePool
(poolBase: P[], removalLaxity = 0): () => P { return pick; } const index = pool.findIndex((v) => equal(v, pick)); + console.log({ pool }); if (index === -1) throw new Error("could not find pick from pool"); pool.splice(index, 1); // If the pool is empty, reset it