diff --git a/src/components/GenderGame.tsx b/src/components/GenderGame.tsx index 1216a06..2582420 100644 --- a/src/components/GenderGame.tsx +++ b/src/components/GenderGame.tsx @@ -15,6 +15,8 @@ import { firstVariation, } from "../lib/text-tools"; +const genders: T.Gender[] = ["masc", "fem"]; + // const masc = words.filter((w) => w.entry.c === "n. m."); // const fem = words.filter((w) => w.entry.c === "n. f."); type CategorySet = Record; @@ -51,15 +53,16 @@ const amount = 40; export default function({level}: { level: 1 | 2 }) { function* questions () { const wordPool = {...types}; + const exceptionsPool = {...exceptions}; for (let i = 0; i < amount; i++) { const base = level === 1 ? wordPool - : getRandomFromList([wordPool, exceptions]); - const gender = getRandomFromList(Object.keys(base)); + : getRandomFromList([wordPool, exceptionsPool]); + const gender = getRandomFromList(genders); let typeToUse: string; do { typeToUse = getRandomFromList(Object.keys(base[gender])); - } while (!base[gender].length); + } while (!base[gender][typeToUse].length); const question = getRandomFromList(base[gender][typeToUse]).entry; base[gender][typeToUse] = base[gender][typeToUse].filter(({ entry }) => entry.ts !== question.ts); yield { diff --git a/src/components/UnisexNounGame.tsx b/src/components/UnisexNounGame.tsx index fde5d55..627763a 100644 --- a/src/components/UnisexNounGame.tsx +++ b/src/components/UnisexNounGame.tsx @@ -104,9 +104,9 @@ export default function() { value={answer} onChange={handleInput} /> - -
- +
+ Type Enter to check +
diff --git a/src/words/noun-adj-categories/nouns-unisex.js b/src/words/noun-adj-categories/nouns-unisex.js index bcc3fab..c2fa068 100644 --- a/src/words/noun-adj-categories/nouns-unisex.js +++ b/src/words/noun-adj-categories/nouns-unisex.js @@ -40,7 +40,7 @@ module.exports = [ { ts: 1575924767041, e: `shepherd` }, // شپون - shpoon { ts: 1527815279, e: `shepherd` }, // شپونکی - shpoonkey { ts: 1527819173, e: `analyst, examiner` }, // شنونکی - shanóonkey - { ts: 1612614411126, e: `teacher` }, // ښووونکی - xowóonkey + { ts: 1527812806, e: `teacher` }, // ښووونکی - xowóonkey { ts: 1527815436, e: `tyrant, oppressor, cruel person` }, // ظالم - zaalim { ts: 1527818632, e: `twin` }, // غبرګونی - ghbargoney { ts: 1527812624, e: `thief` }, // غل - ghul