Greek Practice App
body {
font-family: sans-serif;
text-align: center;
background-color: #f8f9fa;
padding: 20px;
transition: background-color 0.3s ease;
}
.hidden { display: none; }
.flash-green { background-color: #c8facc; }
.flash-red { background-color: #f8caca; }
button {
font-size: 1.5rem;
padding: 10px 20px;
margin: 10px;
}
/*——————- Fun fact ———————*/
#funFact {
padding: 20px;
margin-bottom: 20px;
border: 2px solid #000;
background: #edf5ff;
font-size: 1.2em;
font-family: Arial, sans-serif;
border-radius: 10px;
}
📖 Biblical Languages Practice
▶️ Start Practice
⏱ Time left: 60s
✅ Correct: 0
📊 Accuracy: 0%
Fun Fact
Word
Meaning
✔️ Yes
❌ No
⏹ Exit Practice
🎮 Word Crossing Game
🐤 River Crossing
⏱ Time left: 60s
✅ Correct: 0
📊 Accuracy: 0%
⏹ Exit Game
const defaultGreek = [
{ word: “ὁ”, meaning: “the”, fact: “Most common definite article in Greek.” },
{ word: “καί”, meaning: “and, also, even”, fact: “Used to link words or clauses closely.” },
{ word: “αὐτός”, meaning: “he, she, it, self, same”, fact: “Can emphasize identity or reflexivity.” },
{ word: “δέ”, meaning: “but, and, now”, fact: “Often contrasts ideas subtly.” },
{ word: “σύ”, meaning: “you (singular)”, fact: “Used for informal or singular address.” },
{ word: “ἐγώ”, meaning: “I”, fact: “Emphasizes the speaker personally.” },
{ word: “οὗτος”, meaning: “this, these”, fact: “Points out something near the speaker.” },
{ word: “ὅτι”, meaning: “that, because, since”, fact: “Common in causal or explanatory clauses.” },
{ word: “κύριος”, meaning: “Lord, master”, fact: “Title often applied to God in the NT.” },
{ word: “Ἰησοῦς”, meaning: “Jesus”, fact: “Greek form of the Hebrew name Joshua.” },
{ word: “θεός”, meaning: “God”, fact: “Appears nearly 1,300 times in the New Testament.” },
{ word: “μή”, meaning: “not (with non-indicative verbs)”, fact: “Negates commands and subjunctives.” },
{ word: “εἰμί”, meaning: “I am”, fact: “One of the most irregular verbs in Greek.” },
{ word: “ἐν”, meaning: “in, on, among”, fact: “Expresses location or time.” },
{ word: “οὐ”, meaning: “not (with indicative verbs)”, fact: “Used for factual negation.” },
{ word: “τοῦτο”, meaning: “this”, fact: “Neuter form often referring to concepts.” },
{ word: “ἔχω”, meaning: “I have, hold”, fact: “Can express possession or condition.” },
{ word: “γάρ”, meaning: “for, because”, fact: “Explains or justifies previous statements.” },
{ word: “πᾶς”, meaning: “all, every”, fact: “Used for totality or universality.” },
{ word: “ποιέω”, meaning: “I do, make”, fact: “Very common verb with broad meaning.” },
{ word: “λέγω”, meaning: “I say, speak”, fact: “Root of English ‘logic’ and ‘dialogue.’” },
{ word: “ἡμέρα”, meaning: “day”, fact: “Can also mean ‘time’ or ‘lifetime’.” },
{ word: “ἄνθρωπος”, meaning: “man, human being”, fact: “Generic term for a person.” },
{ word: “τις”, meaning: “someone, anyone, a certain one”, fact: “Indefinite pronoun used frequently.” },
{ word: “χριστός”, meaning: “Christ, Messiah”, fact: “Means ‘anointed one’ in Greek.” },
{ word: “ἀπό”, meaning: “from, away from”, fact: “Indicates separation or origin.” },
{ word: “ὡς”, meaning: “as, like, when”, fact: “Used for comparison or time.” },
{ word: “ἐπί”, meaning: “on, upon, over”, fact: “Often used with genitive, dative, or accusative.” },
{ word: “διά”, meaning: “through, on account of”, fact: “Can indicate cause or means.” },
{ word: “ἐκ”, meaning: “out of, from”, fact: “Expresses origin or source.” },
{ word: “ἔρχομαι”, meaning: “I come, go”, fact: “Frequently used verb for movement.” },
{ word: “εἰ”, meaning: “if”, fact: “Introduces conditional sentences.” },
{ word: “ἴνα”, meaning: “in order that, so that”, fact: “Often introduces purpose clauses.” },
{ word: “ἔτι”, meaning: “still, yet”, fact: “Indicates continuation in time.” },
{ word: “ἄν”, meaning: “particle for potentiality”, fact: “Modifies verbs to show possibility or contingency.” },
{ word: “εἶπον”, meaning: “I said”, fact: “Aorist form of ‘λέγω’.” },
{ word: “βλέπω”, meaning: “I see”, fact: “Root of ‘blindsight’ in English.” },
{ word: “πολύς”, meaning: “much, many”, fact: “Indicates large quantity or degree.” },
{ word: “ἀλλά”, meaning: “but, however”, fact: “Stronger adversative conjunction than ‘δέ.’” },
{ word: “περί”, meaning: “about, concerning”, fact: “Often governs genitive or accusative.” },
{ word: “ἄγγελος”, meaning: “angel, messenger”, fact: “Means ‘messenger’ in Greek, not just heavenly beings.” },
{ word: “πνεῦμα”, meaning: “spirit, breath”, fact: “Root of English ‘pneumatic’.” },
{ word: “νῦν”, meaning: “now”, fact: “Used frequently in New Testament narrative.” },
{ word: “πατήρ”, meaning: “father”, fact: “Root for ‘patriarch’ and ‘paternal.’” },
{ word: “οὐδείς”, meaning: “no one, nothing”, fact: “Strong negative pronoun.” },
{ word: “ἀδελφός”, meaning: “brother”, fact: “Often used metaphorically for fellow believers.” },
{ word: “ὄνομα”, meaning: “name”, fact: “Names held great significance in Greek culture.” },
{ word: “γινώσκω”, meaning: “I know”, fact: “Related to knowledge and recognition.” },
{ word: “ἡ”, meaning: “the (feminine)”, fact: “Feminine definite article counterpart to ‘ὁ.’” },
{ word: “ἔθνος”, meaning: “nation, Gentile”, fact: “Often refers to non-Jewish peoples.” },
{ word: “ἅγιος”, meaning: “holy, saint”, fact: “Means ‘set apart’ for God.” },
{ word: “λαμβάνω”, meaning: “I take, receive”, fact: “Common verb in receiving or accepting.” },
{ word: “λόγος”, meaning: “word, message”, fact: “Central term in John’s Gospel for Jesus.” },
{ word: “ἐξέρχομαι”, meaning: “I go out, come out”, fact: “Often used for departure or exit.” },
{ word: “ἀνήρ”, meaning: “man, husband”, fact: “Often denotes adult male or spouse.” },
{ word: “γῆ”, meaning: “earth, land”, fact: “Root of ‘geography’ and ‘geology.’” },
{ word: “οὐρανός”, meaning: “heaven, sky”, fact: “Represents the spiritual realm.” },
{ word: “πιστεύω”, meaning: “I believe”, fact: “Root of English ‘pistis’ meaning faith.” },
{ word: “δούς”, meaning: “having given”, fact: “Aorist participle of ‘δίδωμι.’” },
{ word: “ἀκούω”, meaning: “I hear”, fact: “Root of English ‘acoustics.’” },
{ word: “νόμος”, meaning: “law”, fact: “Central to Jewish religious practice.” },
{ word: “παιδίον”, meaning: “child, infant”, fact: “Diminutive form of ‘παῖς’.” },
{ word: “γυνή”, meaning: “woman, wife”, fact: “Often denotes adult female or spouse.” },
{ word: “δόξα”, meaning: “glory”, fact: “Used to describe God’s majestic presence.” },
{ word: “καρδία”, meaning: “heart”, fact: “Represents mind and will, not just organ.” },
{ word: “μέγας”, meaning: “great, large”, fact: “Used to express size or importance.” },
{ word: “πίστις”, meaning: “faith”, fact: “Core concept in New Testament theology.” },
{ word: “οἶκος”, meaning: “house”, fact: “Can mean household or family.” },
{ word: “χάρις”, meaning: “grace, favor”, fact: “Key term for God’s unearned favor.” },
{ word: “σωτήρ”, meaning: “savior”, fact: “Title frequently applied to Jesus.” },
{ word: “φῶς”, meaning: “light”, fact: “Symbolizes truth and revelation.” },
{ word: “ἀλήθεια”, meaning: “truth”, fact: “Root of English ‘aletheia’ meaning disclosure.” },
{ word: “ψυχή”, meaning: “soul, life”, fact: “Also means ‘life force’ or ‘person.’” },
{ word: “ὕδωρ”, meaning: “water”, fact: “Essential symbol in baptism.” },
{ word: “φίλος”, meaning: “friend”, fact: “Expresses close personal relationship.” },
{ word: “κακός”, meaning: “bad, evil”, fact: “Describes moral or qualitative badness.” },
{ word: “ἀρχή”, meaning: “beginning, ruler”, fact: “Can mean authority or origin.” },
{ word: “δύναμις”, meaning: “power”, fact: “Root of English ‘dynamite’.” },
{ word: “ὁδός”, meaning: “way, road”, fact: “Jesus calls Himself ‘the Way.’” },
{ word: “ἔργον”, meaning: “work, deed”, fact: “Often used for actions or miracles.” },
{ word: “ἁμαρτία”, meaning: “sin”, fact: “Literally means ‘missing the mark.’” },
{ word: “πρόσωπον”, meaning: “face, presence”, fact: “Indicates personal presence or character.” },
{ word: “ζωή”, meaning: “life”, fact: “Used for eternal life in the New Testament.” },
{ word: “βασιλεία”, meaning: “kingdom”, fact: “Key theme in Jesus’ teaching.” },
{ word: “ἀγαπάω”, meaning: “I love”, fact: “Describes selfless, sacrificial love.” },
{ word: “ἀποστέλλω”, meaning: “I send”, fact: “Root of English ‘apostle’ meaning messenger.” },
{ word: “μαθητής”, meaning: “disciple”, fact: “Means learner or follower.” },
{ word: “ὄχλος”, meaning: “crowd, multitude”, fact: “Often appears in Gospel narratives.” },
{ word: “σημεῖον”, meaning: “sign, miracle”, fact: “Used to confirm divine authority.” },
{ word: “καιρός”, meaning: “season, time”, fact: “Implies opportune or appointed time.” },
{ word: “τέκνον”, meaning: “child”, fact: “Can indicate offspring or disciple.” },
{ word: “ἀγαθός”, meaning: “good”, fact: “Describes moral or qualitative goodness.” },
{ word: “ἱερόν”, meaning: “temple”, fact: “Refers to Jewish temple or sanctuary.” },
{ word: “θάνατος”, meaning: “death”, fact: “Physical and spiritual death meanings.” },
{ word: “ἄρτος”, meaning: “bread”, fact: “Symbolizes sustenance and Jesus’ body.” },
{ word: “κεφαλή”, meaning: “head”, fact: “Used metaphorically for leader or source.” },
{ word: “θρόνος”, meaning: “throne”, fact: “Symbolizes divine authority.” },
{ word: “ἐντολή”, meaning: “commandment”, fact: “Central in ethical teachings.” },
{ word: “ἱμάτιον”, meaning: “garment”, fact: “Often symbolizes righteousness or authority.” },
{ word: “ἐχθρός”, meaning: “enemy”, fact: “Used literally and metaphorically.” },
{ word: “καρπός”, meaning: “fruit”, fact: “Metaphor for actions or results.” },
{ word: “σωζω”, meaning: “I save”, fact: “Root of English ‘soteriology.’” },
{ word: “πλοῖον”, meaning: “boat”, fact: “Frequently appears in Gospel miracles.” },
{ word: “ὥρα”, meaning: “hour”, fact: “Can denote an appointed time.” },
{ word: “αἷμα”, meaning: “blood”, fact: “Symbol of life and sacrifice.” },
{ word: “ἁγιος”, meaning: “holy”, fact: “Means set apart or sacred.” },
{ word: “σωτηρία”, meaning: “salvation”, fact: “Central theme of the New Testament.” },
{ word: “χρόνος”, meaning: “time”, fact: “General measure of time.” },
{ word: “ἀγάπη”, meaning: “love”, fact: “Highest form of love in Greek.” },
{ word: “ἐκκλησία”, meaning: “church”, fact: “Originally meant ‘called out assembly.’” },
{ word: “σῶμα”, meaning: “body”, fact: “Used for physical and metaphorical body.” },
{ word: “ἐλπίς”, meaning: “hope”, fact: “Confident expectation of good.” },
{ word: “μήτηρ”, meaning: “mother”, fact: “Common familial term.” },
{ word: “ἀνάστασις”, meaning: “resurrection”, fact: “Core belief in Christian faith.” },
{ word: “φόβος”, meaning: “fear”, fact: “Can mean reverence or terror.” },
{ word: “ἁρπαγή”, meaning: “rapture, snatching away”, fact: “Describes sudden catching up.” },
{ word: “χαρά”, meaning: “joy”, fact: “Deep gladness, not just happiness.” },
{ word: “ἁγιάζω”, meaning: “I sanctify”, fact: “Means to make holy or set apart.” },
{ word: “ἁμαρτωλός”, meaning: “sinner”, fact: “One who misses the mark.” },
{ word: “καθίστημι”, meaning: “I appoint”, fact: “Often used in official settings.” },
// Hebrew words follow – Hebrew fun facts:
{ word: “י-ה-וה”, meaning: “LORD (God)”, fact: “The sacred Tetragrammaton.” },
{ word: “אמר”, meaning: “say, speak”, fact: “Root of communication.” },
{ word: “בן”, meaning: “son”, fact: “Often used in genealogies.” },
{ word: “עשה”, meaning: “do, make”, fact: “Common verb in the Hebrew Bible.” },
{ word: “אלה”, meaning: “God”, fact: “Plural form sometimes indicating majesty.” },
{ word: “בא”, meaning: “come, go”, fact: “Root for entering or arriving.” },
{ word: “מלך”, meaning: “king”, fact: “Central figure in Israelite history.” },
{ word: “ישראל”, meaning: “Israel”, fact: “Means ‘he struggles with God.’” },
{ word: “הלך”, meaning: “walk, go”, fact: “Common metaphor for life’s journey.” },
{ word: “נתן”, meaning: “give”, fact: “Expresses generosity or command.” },
{ word: “ראה”, meaning: “see”, fact: “Often implies understanding.” },
{ word: “שמע”, meaning: “hear, obey”, fact: “Important in covenant context.” },
{ word: “דבר”, meaning: “speak, word”, fact: “Also means ‘thing’ or ‘matter.’” },
{ word: “יצא”, meaning: “go out”, fact: “Used for exiting or issuing forth.” },
{ word: “קרא”, meaning: “call, read”, fact: “Root of ‘qara’ meaning to proclaim.” },
{ word: “עבד”, meaning: “serve, work”, fact: “Can mean servant or slave.” },
{ word: “חזה”, meaning: “see, appear”, fact: “Can also mean prophecy.” },
{ word: “יצב”, meaning: “stand”, fact: “Implies stability or presence.” },
{ word: “לקח”, meaning: “take”, fact: “Common action verb.” },
{ word: “שלח”, meaning: “send”, fact: “Root of ‘shelet’ (sending).” },
{ word: “מצא”, meaning: “find”, fact: “Often used for discovery.” },
{ word: “ברך”, meaning: “bless”, fact: “Key term in worship and prayer.” },
{ word: “שפט”, meaning: “judge”, fact: “Used in legal and moral contexts.” },
{ word: “ישב”, meaning: “sit, dwell”, fact: “Used for residing or remaining.” },
{ word: “ירא”, meaning: “fear”, fact: “Also means reverence toward God.” },
{ word: “כפר”, meaning: “cover, atone”, fact: “Basis for atonement rituals.” },
{ word: “נתק”, meaning: “cut off”, fact: “Used for exile or separation.” },
{ word: “כָּתַב”, meaning: “write”, fact: “Important for scripture transmission.” },
{ word: “נפל”, meaning: “fall”, fact: “Can mean physical or moral fall.” },
{ word: “שב”, meaning: “return”, fact: “Used for repentance or restoration.” },
{ word: “קם”, meaning: “rise, stand”, fact: “Symbolic of resurrection or power.” },
{ word: “חזק”, meaning: “strengthen”, fact: “Often used to encourage.” },
{ word: “כבד”, meaning: “honor, heavy”, fact: “Also means weight or glory.” },
{ word: “נשא”, meaning: “lift, carry”, fact: “Can mean bear a burden.” },
{ word: “רב”, meaning: “multiply”, fact: “Used for growth or increase.” },
{ word: “שכב”, meaning: “lie down”, fact: “Also euphemism for sexual relations.” },
{ word: “ידע”, meaning: “know”, fact: “Can mean intimate knowledge.” },
{ word: “נגע”, meaning: “touch, strike”, fact: “Can indicate both blessing and curse.” },
{ word: “שמר”, meaning: “keep, guard”, fact: “Important in covenant obedience.” },
{ word: “פקד”, meaning: “visit, attend to”, fact: “Often divine attention or judgment.” },
{ word: “למד”, meaning: “learn, teach”, fact: “Root of ‘lamed,’ the Hebrew letter.” },
{ word: “נצל”, meaning: “rescue, deliver”, fact: “Used for salvation or help.” },
{ word: “שאל”, meaning: “ask”, fact: “Expresses request or inquiry.” },
{ word: “צוה”, meaning: “command”, fact: “Central to Torah law.” },
{ word: “חיה”, meaning: “live”, fact: “Root of Hebrew ‘chaya.’” },
{ word: “ברא”, meaning: “create”, fact: “Used exclusively of divine creation.” },
{ word: “קטר”, meaning: “burn offering”, fact: “Important sacrificial ritual.” },
{ word: “ענה”, meaning: “answer”, fact: “Can mean respond or afflict.” },
{ word: “שמח”, meaning: “rejoice”, fact: “Expresses joy or gladness.” },
{ word: “אכל”, meaning: “eat”, fact: “Common verb for consuming food.” },
{ word: “מלט”, meaning: “escape”, fact: “Used for deliverance or flight.” },
{ word: “שבר”, meaning: “break”, fact: “Used literally and metaphorically.” },
{ word: “קבר”, meaning: “bury”, fact: “Relates to death and burial.” },
{ word: “צום”, meaning: “fast”, fact: “Practice of abstaining from food.” },
{ word: “רעה”, meaning: “pasture, shepherd”, fact: “Metaphor for guidance and care.” },
{ word: “רפא”, meaning: “heal”, fact: “Often used for physical and spiritual healing.” },
{ word: “אחז”, meaning: “take hold”, fact: “Can mean grasp or seize.” },
{ word: “עבר”, meaning: “pass over”, fact: “Central to Passover story.” },
{ word: “נחם”, meaning: “comfort”, fact: “Can also mean regret or repentance.” },
{ word: “עלה”, meaning: “go up”, fact: “Often used for ascending to worship.” },
{ word: “פנה”, meaning: “turn”, fact: “Can mean change direction or repent.” },
{ word: “נבא”, meaning: “prophesy”, fact: “Related to speaking God’s message.” },
{ word: “ירש”, meaning: “inherit”, fact: “Key concept in land and covenant.” },
{ word: “צעק”, meaning: “cry out”, fact: “Often calls for help or justice.” },
{ word: “שנא”, meaning: “hate”, fact: “Used for strong aversion.” },
{ word: “לך”, meaning: “walk”, fact: “Common verb for movement or conduct.” },
{ word: “זכר”, meaning: “remember”, fact: “Important in covenant faithfulness.” },
{ word: “אָמַר”, meaning: “he said”, fact: “Frequently introduces speech or prophecy.” },
{ word: “שָׁלוֹם”, meaning: “peace”, fact: “More than absence of war, means wholeness.” },
{ word: “שֵׁם”, meaning: “name”, fact: “Represents reputation and identity.” },
{ word: “מַיִם”, meaning: “water”, fact: “Symbolizes life and cleansing.” },
{ word: “לָקַח”, meaning: “he took”, fact: “Common verb for receiving.” },
{ word: “שָׁמַע”, meaning: “he heard”, fact: “Often indicates obedience.” },
{ word: “בַּיִת”, meaning: “house”, fact: “Can mean home or family lineage.” },
{ word: “אָב”, meaning: “father”, fact: “Represents authority and origin.” },
{ word: “תּוֹרָה”, meaning: “law, instruction”, fact: “Central in Jewish teaching.” },
{ word: “נָשִׁים”, meaning: “women”, fact: “Plural of ‘ishah’ (woman).” },
{ word: “קֹדֶשׁ”, meaning: “holiness”, fact: “Means being set apart for God.” },
{ word: “אָח”, meaning: “brother”, fact: “Indicates kinship or close relation.” },
{ word: “טוֹב”, meaning: “good”, fact: “Used frequently in creation narrative.” },
{ word: “צָבָא”, meaning: “host, army”, fact: “Often used for heavenly armies.” },
{ word: “הָלַךְ”, meaning: “he walked”, fact: “Common verb for daily activity.” },
{ word: “אֵשׁ”, meaning: “fire”, fact: “Symbolizes purification and God’s presence.” },
{ word: “יָצָא”, meaning: “he went out”, fact: “Describes movement or departure.” },
{ word: “אָכַל”, meaning: “he ate”, fact: “Basic verb for consumption.” },
{ word: “פֶּה”, meaning: “mouth”, fact: “Represents speech and expression.” },
{ word: “שָׁמַיִם”, meaning: “heavens, sky”, fact: “Plural form indicating the cosmos.” },
{ word: “דָּבָר”, meaning: “word, thing”, fact: “Also means ‘matter’ or ‘affair.’” },
{ word: “בָּרָא”, meaning: “he created”, fact: “Exclusive to divine creative acts.” },
{ word: “רָאָה”, meaning: “he saw”, fact: “Often implies perception or insight.” },
{ word: “עֵץ”, meaning: “tree, wood”, fact: “Important in biblical symbolism.” },
{ word: “רוּחַ”, meaning: “spirit, wind”, fact: “Represents breath and divine presence.” },
{ word: “צֶדֶק”, meaning: “righteousness”, fact: “Central in justice and covenant faithfulness.” },
{ word: “צַדִּיק”, meaning: “righteous”, fact: “Describes one who is just or innocent.” },
{ word: “עֵין”, meaning: “eye”, fact: “Also means ‘spring’ or source of water.” },
{ word: “אֵל”, meaning: “God, mighty one”, fact: “Common Semitic term for deity.” },
{ word: “בֵּן”, meaning: “son”, fact: “Used in family and tribal identity.” },
{ word: “אֵם”, meaning: “mother”, fact: “Represents nurture and origin.” },
{ word: “חַיִּים”, meaning: “life”, fact: “Plural form often denotes vitality.” },
{ word: “חֶסֶד”, meaning: “lovingkindness, mercy”, fact: “Key divine attribute in the Old Testament.” },
{ word: “יָשַׁב”, meaning: “he sat, dwelled”, fact: “Used for habitation or settling.” },
{ word: “שֶׁמֶשׁ”, meaning: “sun”, fact: “Symbolizes light and time.” },
{ word: “יֶלֶד”, meaning: “child”, fact: “Can mean boy or youth.” },
{ word: “נֶפֶשׁ”, meaning: “soul, life”, fact: “Often means ‘person’ or ‘self.’” },
{ word: “כֹּהֵן”, meaning: “priest”, fact: “Mediator between God and people.” },
{ word: “רֶגֶל”, meaning: “foot”, fact: “Represents movement or travel.” },
{ word: “לֵב”, meaning: “heart”, fact: “Center of intellect and emotion.” },
{ word: “אֶרֶץ”, meaning: “land, earth”, fact: “Can mean country or territory.” },
{ word: “עַיִן”, meaning: “eye, spring”, fact: “Dual meaning often used metaphorically.” },
{ word: “כָּבוֹד”, meaning: “glory”, fact: “Expresses weightiness or honor.” }
];
// PRACTICE MODE
let correctCount = 0, totalCount = 0, timeLeft = 60, timer;
let currentWord = {}, isCorrectAnswer = false;
let fact = null;
function startPractice() {
document.getElementById(‘start-screen’).classList.add(‘hidden’);
document.getElementById(‘practice-screen’).classList.remove(‘hidden’);
correctCount = 0;
totalCount = 0;
timeLeft = 60;
updateStats();
nextSet();
document.getElementById(‘timer’).textContent = timeLeft;
timer = setInterval(() => {
timeLeft–;
document.getElementById(‘timer’).textContent = timeLeft;
if (timeLeft <= 0) {
clearInterval(timer);
alert(`Time's up! You got ${correctCount} out of ${totalCount} correct.`);
exitPractice();
}
}, 1000);
}
function exitPractice() {
clearInterval(timer);
document.getElementById('practice-screen').classList.add('hidden');
document.getElementById('start-screen').classList.remove('hidden');
}
function updateStats() {
document.getElementById("correct").textContent = correctCount;
const accuracy = totalCount === 0 ? 0 : Math.round((correctCount / totalCount) * 100);
document.getElementById("accuracy").textContent = accuracy + "%";
}
function nextSet() {
const wordObj = defaultGreek[Math.floor(Math.random() * defaultGreek.length)];
const isMatch = Math.random() {
document.getElementById(“word”).textContent = currentWord.word;
document.getElementById(“meaning”).textContent = currentWord.meaning;
}, 200);
setTimeout(nextSet, 2200);
}
function flashScreen(className) {
document.body.classList.add(className);
setTimeout(() => document.body.classList.remove(className), 500);
}
// RIVER CROSSING GAME MODE
let gameBird, obstacles, tools, animationFrame, timerInterval;
function startGame() {
document.getElementById(‘game-start-screen’).classList.add(‘hidden’);
document.getElementById(‘game-screen’).classList.remove(‘hidden’);
correctCount = 0;
totalCount = 0;
timeLeft = 60;
updateStats();
document.getElementById(‘timer’).textContent = timeLeft;
timerInterval = setInterval(() => {
timeLeft–;
document.getElementById(‘timer’).textContent = timeLeft;
if (timeLeft w.meaning))];
tools = getRandomTools();
gameBird = { x: 180, y: 160, size: 20 };
obstacles = generateObstacles(obstacleOptions);
function draw() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = “orange”;
ctx.beginPath();
ctx.arc(gameBird.x, gameBird.y, gameBird.size, 0, Math.PI * 2);
ctx.fill();
ctx.fillStyle = “black”;
ctx.font = “16px sans-serif”;
obstacles.forEach(obs => ctx.fillText(obs.text, obs.x, obs.y));
ctx.fillStyle = “blue”;
ctx.font = “16px sans-serif”;
tools.forEach((tool, i) => ctx.fillText(tool.word, 10 + i * 90, 195));
animationFrame = requestAnimationFrame(draw);
}
draw();
function hasAtLeastOneMatch(tools, obstacles) {
const toolMeanings = tools.map(t => t.meaning);
return obstacles.some(o => toolMeanings.includes(o.text));
}
function replaceToolAtPosition(positionIndex) {
let newTool;
do {
newTool = getRandomTool();
} while (
tools.some(t => t.word === newTool.word) || // avoid duplicate tool words
!hasAtLeastOneMatch(
[…tools.slice(0, positionIndex), newTool, …tools.slice(positionIndex + 1)],
obstacles
) // ensure matching obstacle exists with new tool set
);
tools[positionIndex] = newTool;
}
function replaceObstacleAtPosition(index, obstacleOptions) {
let newText;
do {
newText = obstacleOptions[Math.floor(Math.random() * obstacleOptions.length)];
} while (
obstacles.some(o => o.text === newText) || // avoid duplicate obstacle texts
!hasAtLeastOneMatch(
tools,
[…obstacles.slice(0, index), { text: newText, x: 0, y: 0 }, …obstacles.slice(index + 1)]
) // ensure matching tool exists with new obstacle set
);
obstacles[index] = { text: newText, x: 20 + index * 90, y: 60 };
}
function generateObstacles(obstacleOptions) {
const toolMeanings = tools.map(t => t.meaning);
const matchCount = Math.floor(Math.random() * 2) + 1; // 1 or 2 matches
const matches = toolMeanings.sort(() => 0.5 – Math.random()).slice(0, matchCount);
const usedTexts = new Set();
let result = [];
for (let i = 0; i < 4; i++) {
let text;
if (i {
const x = e.offsetX;
const y = e.offsetY;
const clickedObstacle = obstacles.find(obs => x >= obs.x && x = obs.y – 16 && y entry.meaning === clickedObstacle.text);
if (match) {
flashWordPair(match.meaning, match.word);
}
totalCount++;
const matchIndex = tools.findIndex(tool => tool.meaning === clickedObstacle.text);
if (matchIndex !== -1) {
correctCount++;
replaceToolAtPosition(matchIndex);
flashScreen(‘flash-green’);
} else {
flashScreen(‘flash-red’);
}
updateStats();
const index = obstacles.indexOf(clickedObstacle);
replaceObstacleAtPosition(index, obstacleOptions);
});
}
function getRandomTool() {
return defaultGreek[Math.floor(Math.random() * defaultGreek.length)];
}
function getRandomTools() {
let result = [];
while (result.length t.word === tool.word)) {
result.push(tool);
}
}
return result;
}
function generateObstacles(options) {
let result = [];
const toolMeanings = tools.map(t => t.meaning);
const matches = toolMeanings.sort(() => 0.5 – Math.random()).slice(0, Math.floor(Math.random() * 2) + 1);
while (result.length < 4) {
let candidate = result.length o.text === candidate)) {
result.push({ text: candidate, x: 20 + result.length * 90, y: 60 });
}
}
return result;
}
function flashWordPair(english, greek) {
const flashDiv = document.createElement(“div”);
flashDiv.innerText = `${english} – ${greek}`;
flashDiv.style.position = “absolute”;
flashDiv.style.top = “50%”;
flashDiv.style.left = “50%”;
flashDiv.style.transform = “translate(-50%, -50%)”;
flashDiv.style.padding = “10px 20px”;
flashDiv.style.backgroundColor = “rgba(0, 0, 0, 0.8)”;
flashDiv.style.color = “white”;
flashDiv.style.fontSize = “24px”;
flashDiv.style.borderRadius = “10px”;
flashDiv.style.zIndex = 1000;
flashDiv.style.pointerEvents = “none”;
document.body.appendChild(flashDiv);
setTimeout(() => {
document.body.removeChild(flashDiv);
}, 2000);
}