From 2d7840c3647f75441ad3e702f3e8ec3bebd6add7 Mon Sep 17 00:00:00 2001 From: sabrina-aip <93457861+sabrina-aip@users.noreply.github.com> Date: Mon, 15 Jan 2024 13:04:01 -0500 Subject: [PATCH] Fix icon Changed from pause to stop icon for improved clarity on button function. Also fixed practice / youtube mode so that the icon properly resets. --- .DS_Store | Bin 0 -> 6148 bytes assets/scripts/keyboard.js | 10 +- assets/scripts/practice.js | 10 +- assets/scripts/wordLstGenerator2.js | 114 ----------- assets/scripts/youtube.js | 32 ++-- assets/scripts/youtube2.js | 287 ---------------------------- youtube.html | 4 +- 7 files changed, 26 insertions(+), 431 deletions(-) create mode 100644 .DS_Store delete mode 100644 assets/scripts/wordLstGenerator2.js delete mode 100644 assets/scripts/youtube2.js diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..84f56612f1a27cb61eff36a7ae198c6a185c30e1 GIT binary patch literal 6148 zcmeHKISv9b4733uBpOP}e1RWC2wuPkKmySqkhtotco$D&d^E7oL4(FCXA;Mg)lLzw zMMS5U^+aSOA_KUg+-zu@?VGo(lMw~NamHCr*Tr$aJM6cu?DqlV_GKj}JewE3?a`buj$yu{@0mP=P;C!0v|vH>`J2f3w#N;oIBhMbEjbNat!oxjD?lsu_r}du{ri@ VViV|e#GMZ0&w%MdqXNHH-~qms6~O=i literal 0 HcmV?d00001 diff --git a/assets/scripts/keyboard.js b/assets/scripts/keyboard.js index e9c19cb5..6f66b762 100644 --- a/assets/scripts/keyboard.js +++ b/assets/scripts/keyboard.js @@ -188,7 +188,7 @@ function checkGuess() { stopSound(activePlayer[1]); activePlayer[0].style.backgroundColor = "#79b15a"; activePlayer[0].classList.add("submitted", "fa-check"); - activePlayer[0].classList.remove("clicked","fa-play-circle", "fa-pause-circle","btn"); + activePlayer[0].classList.remove("clicked","fa-play-circle", "fa-circle-stop","btn"); // RECORD FOR RESULTS submissionLst.push(`${attemptStr}`) @@ -200,7 +200,7 @@ function checkGuess() { stopSound(activePlayer[1]); activePlayer[0].style.backgroundColor = "#d25842"; activePlayer[0].classList.add("submitted", "fa-xmark"); - activePlayer[0].classList.remove("clicked","fa-pause-circle", "fa-play-circle","btn"); + activePlayer[0].classList.remove("clicked","fa-circle-stop", "fa-play-circle","btn"); // RECORD FOR RESULTS submissionLst.push(`${attemptStr}`) @@ -224,7 +224,7 @@ function checkGuess() { function updatePlayer(playerLst, activePlayer) { if (activePlayer[0].classList.contains("clicked")) { stopSound(activePlayer[1]); - activePlayer[0].classList.remove("clicked","fa-pause-circle"); + activePlayer[0].classList.remove("clicked","fa-circle-stop"); activePlayer[0].classList.add("fa-play-circle"); lastActiveWord = activeWord; @@ -238,10 +238,10 @@ function updatePlayer(playerLst, activePlayer) { playerLst.forEach((player) => { if ((!player[0].classList.contains("submitted")) & player[0] != activePlayer[0]) { - player[0].classList.remove("clicked", "fa-pause-circle"); + player[0].classList.remove("clicked", "fa-circle-stop"); stopSound(player[1]); } else if ((!player[0].classList.contains("submitted")) & player[0] == activePlayer[0]) { - activePlayer[0].classList.add("clicked","fa-pause-circle"); + activePlayer[0].classList.add("clicked","fa-circle-stop"); activePlayer[1].play(); } }) diff --git a/assets/scripts/practice.js b/assets/scripts/practice.js index dd527051..d400bdc0 100644 --- a/assets/scripts/practice.js +++ b/assets/scripts/practice.js @@ -86,7 +86,6 @@ function updateWord(){ resetPlayer(playerLst); activeWord = wordLst[wordCounter]; wordOnePlayer.src = `${path}/${wordLst[wordCounter]}.mp3` - console.log(`Word Counter: ${wordCounter}.\nActive Word: ${activeWord}`) publicCount.textContent = `Words Spelled: ${wordCounter}` } @@ -172,9 +171,8 @@ function checkGuess() { function updatePlayer(playerLst, activePlayer) { if (activePlayer[0].classList.contains("clicked")) { stopSound(activePlayer[1]); - activePlayer[0].classList.remove("clicked","fa-pause-circle"); + activePlayer[0].classList.remove("clicked","fa-circle-stop"); activePlayer[0].classList.add("fa-play-circle"); - lastActiveWord = activeWord; // DEACTIVATE WORD @@ -185,10 +183,10 @@ function updatePlayer(playerLst, activePlayer) { playerLst.forEach((player) => { if ((!player[0].classList.contains("submitted")) & player[0] != activePlayer[0]) { - player[0].classList.remove("clicked", "fa-pause-circle"); + player[0].classList.remove("clicked", "fa-circle-stop"); stopSound(player[1]); } else if ((!player[0].classList.contains("submitted")) & player[0] == activePlayer[0]) { - activePlayer[0].classList.add("clicked","fa-pause-circle"); + activePlayer[0].classList.add("clicked","fa-circle-stop"); activePlayer[1].play(); } }) @@ -198,7 +196,7 @@ function updatePlayer(playerLst, activePlayer) { function resetPlayer(playerLst) { playerLst.forEach((player) => { player[0].style.backgroundColor = null; - player[0].classList.remove("clicked", "fa-xmark","fa-check", "submitted") + player[0].classList.remove("clicked", "fa-xmark","fa-check", "fa-circle-stop", "submitted") player[0].classList.add("fa-play-circle") }) } diff --git a/assets/scripts/wordLstGenerator2.js b/assets/scripts/wordLstGenerator2.js deleted file mode 100644 index 3b91ec7e..00000000 --- a/assets/scripts/wordLstGenerator2.js +++ /dev/null @@ -1,114 +0,0 @@ -const easyWords = ['abandon', 'abruptly', 'acceptance', 'accurate', 'ached', 'acorn', 'acumen', 'addle', 'admirer', 'admit', 'adrift', 'afar', 'aforesaid', 'afraid', 'agog', 'ahoy', 'aid', 'alas', 'algae', 'alien', 'alley', 'aloha', 'alone', 'alpha', 'also', 'althorn', 'amass', 'amazed', 'Amazon', 'ambitious', 'Amish', 'amount', 'amphibian', 'amulet', 'amusement', 'angora', 'angry', 'anime', 'annual', 'antennas', 'anyway', 'apology', 'apparel', 'applause', 'apple', 'applicable', 'apprehensive', 'apron', 'arcade', 'arduous', 'argue', 'armadillo', 'arms', 'around', 'arrogant', 'ascribe', 'ash', 'astonish', 'astounding', 'astute', 'athlete', 'atonement', 'attitude', 'auction', 'avenue', 'aviation', 'award', 'aware', 'awe', 'awful', 'axle', 'background', 'badger', 'bagpipe', 'bailiff', 'bakery', 'ballad', 'banana', 'bank', 'baptismal', 'barber', 'barefoot', 'bargain', 'barrels', 'basement', 'bask', 'baskets', 'bathtub', 'bauble', 'bawl', 'bead', 'beagle', 'beak', 'beam', 'beans', 'because', 'beckon', 'bedlam', 'bedraggled', 'beeswax', 'began', 'behold', 'belle', 'belly', 'bellyache', 'bemused', 'benches', 'Bengal', 'bent', 'beseech', 'bestow', 'better', 'beverage', 'bias', 'bicycle', 'billboard', 'bingo', 'biology', 'bite', 'bitter', 'blanket', 'bleary', 'blemish', 'blizzard', 'blouse', 'blurb', 'blurred', 'blurted', 'bobcat', 'bogus', 'bombard', 'bonfire', 'bonnet', 'bookworm', 'boom', 'boorish', 'booth', 'bootless', 'born', 'botany', 'botch', 'bother', 'bottle', 'bowie', 'bowl', 'boxcar', 'boycott', 'brass', 'bread', 'breeze', 'bribery', 'brick', 'briefcase', 'brilliant', 'brim', 'bristle', 'broth', 'bubbly', 'buffoonery', 'bugaboo', 'bungee', 'bushel', 'butterscotch', 'button', 'cabbage', 'cabin', 'caboodle', 'cactus', 'cajole', 'cake', 'calico', 'calzone', 'camcorder', 'camera', 'campus', 'cancel', 'candles', 'canteen', 'capitalist', 'capture', 'car', 'caravan', 'career', 'carefully', 'carnation', 'carnival', 'carrot', 'cartoon', 'carving', 'cascade', 'casino', 'castle', 'caterpillar', 'cathedral', 'cattail', 'cattle', 'causal', 'cell', 'cement', 'chain', 'change', 'chaotic', 'chapter', 'charitable', 'chart', 'cheddar', 'cheek', 'cheer', 'cheese', 'chess', 'chia', 'chicken', 'chide', 'child', 'chimes', 'china', 'chips', 'chowder', 'circle', 'circus', 'citation', 'civics', 'clasp', 'classical', 'clause', 'cleave', 'clerks', 'clever', 'clients', 'cliff', 'climate', 'clipper', 'clock', 'clodhopper', 'closed', 'clothes', 'cloudy', 'clover', 'cloying', 'clutch', 'coercive', 'coffee', 'cog', 'cold', 'collect', 'combed', 'companion', 'competitive', 'compilation', 'complaint', 'complete', 'compost', 'concise', 'concrete', 'condiments', 'condition', 'conductor', 'cone', 'congeniality', 'constituent', 'contestants', 'contraction', 'cooking', 'cooperate', 'cord', 'cornily', 'coronet', 'cosmic', 'cost', 'couch', 'cough', 'cousin', 'cove', 'cowlick', 'cranky', 'crate', 'crayon', 'creak', 'creation', 'crew', 'cricket', 'criminal', 'crouched', 'crowd', 'crumpet', 'crumpled', 'crusts', 'cuckoo', 'cucumber', 'culinary', 'cupboard', 'curries', 'cutlery', 'damp', 'dandelion', 'dandruff', 'darling', 'darted', 'dash', 'daughter', 'daunted', 'dauntlessly', 'dawdle', 'day', 'debunk', 'decade', 'deceitful', 'December', 'decision', 'deck', 'deer', 'default', 'delicacy', 'delicate', 'delta', 'demolition', 'deny', 'deodorant', 'depose', 'deputy', 'desk', 'despicable', 'detail', 'detention', 'detour', 'developer', 'dew', 'dialect', 'diaper', 'difficult', 'digestive', 'dignified', 'dilemma', 'diligent', 'dillydally', 'dimension', 'dinner', 'direct', 'disease', 'distinctive', 'distraught', 'dither', 'diversity', 'divine', 'docket', 'dodge', 'dollars', 'dolphin', 'dome', 'domineering', 'domino', 'double', 'dough', 'dowdy', 'downcast', 'dream', 'drill', 'drive', 'drizzle', 'drool', 'drum', 'duckling', 'Dudley', 'dumbwaiter', 'dumplings', 'duo', 'dusk', 'dwindled', 'each', 'eavesdrop', 'eel', 'effortless', 'eggplant', 'eighth', 'either', 'elasticity', 'elderly', 'elm', 'else', 'embers', 'emerge', 'emotional', 'emperor', 'empty', 'enchantment', 'enfranchise', 'enormous', 'entire', 'entrance', 'entreat', 'envoy', 'epic', 'equestrian', 'erase', 'erode', 'escapade', 'escape', 'esteem', 'estimate', 'eternity', 'evacuees', 'everglades', 'evince', 'ewe', 'excavating', 'excellent', 'explanation', 'explosive', 'extinct', 'exude', 'eyelet', 'fabric', 'factoid', 'faculty', 'failure', 'faint', 'fair', 'famished', 'famous', 'fancy', 'fans', 'fantastically', 'farewell', 'farfetched', 'father', 'faucet', 'feats', 'fed', 'fedora', 'feline', 'fellowship', 'felt', 'ferocious', 'fervently', 'fetch', 'film', 'filters', 'fine', 'finish', 'firmly', 'flame', 'flannel', 'flapped', 'flattery', 'flexible', 'floor', 'floridly', 'flounder', 'fluid', 'flustered', 'flute', 'flying', 'foam', 'focus', 'followed', 'foot', 'foothills', 'forage', 'forbidden', 'forever', 'forfeit', 'forgive', 'fortification', 'fortune', 'forty', 'foxes', 'fragile', 'fragrance', 'frailty', 'frames', 'frankly', 'fraught', 'freckle', 'freeze', 'freight', 'frequently', 'fresh', 'friend', 'frivolous', 'frock', 'frogs', 'from', 'fructose', 'full', 'fumble', 'functionary', 'funnel', 'furious', 'furnace', 'furtive', 'galaxy', 'gall', 'gander', 'gargantuan', 'garlic', 'garment', 'gauntlet', 'gel', 'gelatinous', 'generosity', 'genetic', 'genius', 'genuine', 'geometric', 'giant', 'gift', 'giggle', 'gimmick', 'ginger', 'glimmer', 'glinting', 'gloves', 'glucose', 'gnarled', 'gnash', 'goals', 'goblet', 'Godspeed', 'goggles', 'golden', 'gone', 'goods', 'goofy', 'gorp', 'gossip', 'gourd', 'gradual', 'graham', 'granola', 'gravely', 'graze', 'greedy', 'gridiron', 'grins', 'grits', 'groats', 'groom', 'groove', 'grouse', 'grub', 'gruel', 'grumbling', 'guardian', 'guess', 'guffaw', 'gummy', 'gumption', 'gushed', 'gusto', 'gutter', 'gymnastics', 'haggle', 'hairpin', 'hall', 'hamlet', 'hamstring', 'handcuffs', 'handle', 'handyman', 'hangar', 'hangnail', 'hankering', 'hardtack', 'harmonious', 'harrowing', 'harvest', 'hat', 'hatchling', 'Hawaiian', 'hazelnut', 'headdress', 'headlong', 'health', 'hear', 'heartthrob', 'heavenly', 'heiress', 'heist', 'hem', 'heroic', 'herring', 'Highlands', 'hike', 'hire', 'historical', 'hit', 'hobble', 'hodgepodge', 'holiday', 'holler', 'hologram', 'homesteader', 'homework', 'honest', 'honeybee', 'hook', 'hooligan', 'hooves', 'horizon', 'horrid', 'hospitality', 'hotel', 'huge', 'hula', 'humane', 'hunch', 'Hungary', 'hurt', 'hushed', 'hutch', 'hydra', 'hypnotic', 'iceberg', 'idea', 'ignite', 'illness', 'illusionist', 'imagery', 'imagined', 'imbibe', 'imitative', 'impact', 'impolite', 'incendiary', 'incentive', 'inched', 'incompetent', 'indicate', 'indigo', 'infant', 'infiltrate', 'infirm', 'inflate', 'infringe', 'infuriating', 'ingredient', 'initials', 'inlet', 'innermost', 'innocent', 'insect', 'inside', 'insomnia', 'integrity', 'intellectual', 'interloper', 'intertidal', 'introverted', 'invisible', 'invitation', 'invoke', 'iota', 'island', 'isms', 'isolation', 'iteration', 'jabberwocky', 'jacket', 'jam', 'jamboree', 'jangled', 'janitor', 'January', 'jargon', 'jealousy', 'jelly', 'jersey', 'jewel', 'jitterbug', 'jolly', 'jotted', 'journal', 'joyful', 'jubilant', 'jumbo','junior', 'kangaroo', 'kennel', 'kernel', 'kettle', 'keyhole', 'kiddo', 'kidney', 'kiln', 'kilt', 'kindergarten', 'kindred', 'kitchen', 'kites', 'kiwi', 'klutz', 'knack', 'knife', 'knock', 'knot', 'known', 'knuckle', 'Kodiak', 'kosher', 'lactose', 'ladle', 'ladybug', 'lambasted', 'lambkin', 'lamentable', 'landmark', 'lane', 'lantern', 'laptop', 'large', 'laser', 'last', 'lateral', 'lawyer', 'lazily', 'leaf', 'league', 'least', 'leaven', 'leeway', 'left', 'legacy', 'leniency', 'lettuce', 'levity', 'lexicon', 'liberty', 'lid', 'lifetime', 'linen', 'linguistics', 'lisp', 'listener', 'literacy', 'literally', 'lithium', 'little', 'lizard', 'loathe', 'local', 'locker', 'logs', 'lookout', 'loud', 'lounge', 'lower', 'lucky', 'ludicrous', 'lukewarm', 'magician', 'magma', 'magnate', 'magnificent', 'mailboxes', 'major', 'mambo', 'manacle', 'mandate', 'manger', 'mango', 'mangrove', 'manifesto', 'manner', 'manta', 'manufacture', 'marathon', 'marbles', 'marginalize', 'marine', 'marionette', 'marooned', 'marsh', 'martial', 'mastiff', 'matching', 'materialize', 'maternity', 'matron', 'maximum', 'mayhem', 'McMansion', 'measly', 'medallion', 'medusa', 'meekness', 'meet', 'megahertz', 'mellow', 'melodramatic', 'melody', 'melted', 'membership', 'memorandum', 'merchandise', 'Merlin', 'mess', 'meteor', 'microscope', 'midriff', 'migraine', 'mildew', 'militant', 'millionaire', 'mince', 'mink', 'minority', 'miraculous', 'mischief', 'misconception', 'misery', 'misinterpret', 'missile', 'missing', 'missive', 'mister', 'mix', 'modesty', 'mogul', 'moisture', 'monarch', 'Monday', 'money', 'monopolize', 'monstrosity', 'months', 'monumental', 'moose', 'moped', 'mops', 'mortal', 'mortician', 'mosquito', 'mossy', 'motor', 'motto', 'mouth', 'move', 'movie', 'mower', 'much', 'mugs', 'mumble', 'mundane', 'muscular', 'musketeers', 'must', 'muster', 'mutter', 'myself', 'nacho', 'nannies', 'napkin', 'narrow', 'nationalism', 'naturalist', 'navigator', 'nearly', 'necklace', 'neigh', 'neon', 'nephew', 'never', 'newbie', 'nibble', 'nitrate', 'nodded', 'noggin', 'nominee', 'nook', 'noon', 'nourish', 'novelist', 'nuance', 'nuggets', 'nuisance', 'number', 'nurture', 'nutmeg', 'oak', 'oasis', 'obey', 'oblivious', 'oblong', 'obsolete', 'Oceanian', 'offer', 'oil', 'olive', 'omen', 'omission', 'once', 'onion', 'onshore', 'opinionated', 'optician', 'orchestra', 'ordinary', 'organic', 'originate', 'ornament', 'ounce', 'ouster', 'outrageous', 'oval', 'ovation', 'overrun', 'owlishly', 'paddles', 'padlock', 'pain', 'paisley', 'pamper', 'panda', 'panorama', 'paraphrase', 'parasite', 'parasol', 'pardon', 'parenthetic', 'part', 'partridge', 'paste', 'pastel', 'patrol', 'pattern', 'pauper', 'paws', 'peach', 'peanut', 'pear', 'peat', 'peculiar', 'peddle', 'pedigree', 'peerless', 'pellet', 'pencil', 'pending', 'penguin', 'peninsular', 'pensive', 'peppermint', 'percent', 'performance', 'perhaps', 'perimeter', 'periwinkle', 'permafrost', 'permission', 'perplex', 'person', 'pesky', 'petal', 'physical', 'picture', 'pie', 'pieces', 'pigeon', 'pigsty', 'pilferer', 'pilot', 'Pinkerton', 'piper', 'pirate', 'piratical', 'pitiful', 'place', 'plaintiff', 'plates', 'platform', 'pleasant', 'plopped', 'plot', 'plumbing', 'plummet', 'pocket', 'poisonous', 'polenta', 'polish', 'polo', 'poncho', 'pond', 'poor', 'porridge', 'post', 'posterity', 'postpone', 'postural', 'potato', 'powder', 'power', 'praise', 'pranks', 'precursor', 'premium', 'prepare', 'presence', 'pretend', 'pretty', 'primatologist', 'primers', 'princess', 'priority', 'pristine', 'privacy', 'privet', 'prize', 'problem', 'produce', 'profiteer', 'project', 'promise', 'promptly', 'prone', 'proof', 'propaganda', 'proper', 'proposal', 'publish', 'pulley', 'pulpit', 'punily', 'punting', 'puppets', 'puritan', 'purple', 'purse', 'putrid', 'puzzles', 'quack', 'qualitative', 'quality', 'quart', 'quashed', 'quicken', 'rabid', 'radio', 'rafters', 'ragamuffin', 'rage', 'raisin', 'rambling', 'rapids', 'rascal', 'raspberry', 'rats', 'raven', 'ravine', 'ray', 'razz', 'reactionary', 'read', 'receptacle', 'recipient', 'reckon', 'recluse', 'recoup', 'recumbent', 'recyclable', 'redemption', 'reflect', 'refrigerant', 'reggae', 'regiment', 'reign', 'reliable', 'religious', 'relish', 'rely', 'remedial', 'remember', 'repentant', 'repercussion', 'reply', 'repress', 'rescue', 'respect', 'respite', 'restaurant', 'restive', 'results', 'return', 'reveal', 'rhinestone', 'ribbon', 'ribs', 'rich', 'riddance', 'riffraff', 'rinse', 'ripple', 'roar', 'robin', 'rocket', 'rodents', 'rodeo', 'roller', 'rollicking', 'romaine', 'roof', 'rooster', 'rope', 'routine', 'rover', 'rubric', 'rugby', 'rules', 'rush', 'saga', 'salad', 'salsa', 'same', 'sandwich', 'satchel', 'satellite', 'satisfactory', 'saucepan', 'savvy', 'sawdust', 'scale', 'scalp', 'scent', 'scheme', 'science', 'scold', 'scoop', 'scooter', 'scorch', 'scornfully', 'scraped', 'scrapple', 'scripture', 'scrounge', 'scruple', 'seal', 'search', 'season', 'secret', 'sedentary', 'sediment', 'seldom', 'selfie', 'serpentine', 'settee', 'shabby', 'shade', 'shadow', 'shake', 'shambles', 'shamrock', 'shebang', 'sheen', 'shelter', 'shelves', 'Shetland', 'shield', 'shindig', 'shoe', 'shoo', 'shore', 'shoulder', 'shrimp', 'shrugged', 'shudder', 'sidekick', 'sighed', 'silk', 'silly', 'silver', 'simmer', 'singing', 'single', 'sinus', 'sir', 'sirloin', 'size', 'sizzle', 'skateboard', 'skeleton', 'skiing', 'skim', 'skin', 'skirmish', 'skydiving', 'sleek', 'sleepy', 'slide', 'slimy', 'slipshod', 'slither', 'slogan', 'slow', 'sluggard', 'slumber', 'slumped', 'smart', 'smiled', 'smug', 'snarl', 'sniffle', 'snippet', 'snitch', 'snore', 'social', 'soda', 'sofa', 'software', 'solitude', 'son', 'sonar', 'soppiness', 'sound', 'sourly', 'south', 'space', 'spangled', 'Spaniel', 'sparkle', 'spatula', 'speak', 'special', 'specific', 'spectral', 'speech', 'spelunker', 'spider', 'spikes', 'spinal', 'spindle', 'spiral', 'spiteful', 'splurge', 'sport', 'spreadsheet', 'sprinkle', 'sprint', 'spurs', 'squeak', 'squeamish', 'squiggles', 'squirm', 'stack', 'stagestruck', 'standard', 'standee', 'standoff', 'star', 'stared', 'stark', 'stench', 'stencil', 'sterling', 'stewardship', 'sticky', 'still', 'sting', 'stopped', 'storm', 'strands', 'straw', 'stray', 'strong', 'stubble', 'stubborn', 'studied', 'studio', 'stuff', 'stunts', 'sturdy', 'sudden', 'suet', 'suffer', 'summer', 'summoned', 'sundae', 'sunflower', 'supper', 'surefire', 'surly', 'swallow', 'sweat', 'sweeten', 'sweltering', 'swim', 'swipe', 'swirled', 'sword', 'synthetic', 'system', 'tablet', 'tabulate', 'taco', 'taillight', 'talent', 'talking', 'tall', 'tangible', 'tantrum', 'target', 'tarmac', 'tasteless', 'tawny', 'teachers', 'team', 'teaspoon', 'teemed', 'teenagers', 'tennis', 'tentacled', 'terrarium', 'terrier', 'Texas', 'Thailand', 'thanks', 'thawed', 'theme', 'thicket', 'thing', 'third', 'thistle', 'thorn', 'thrilling', 'thunderbolt', 'tibia', 'tickled', 'tiger', 'tightrope', 'timber', 'timidly', 'tirade', 'toddler', 'tolerable', 'tongue', 'tooth', 'torch', 'tortoise', 'toughness', 'towel', 'town', 'track', 'train', 'trait', 'transmissibility', 'transporting', 'trapezoid', 'travel', 'treadmill', 'trencher', 'trendy', 'trice', 'triumphant', 'trivia', 'troll', 'trophy', 'trumpet', 'trunk', 'truth', 'try', 'tufts', 'tuition', 'tulip', 'tummy', 'turning', 'turnip', 'turret', 'turtle', 'tussle', 'twice', 'twinge', 'twirled', 'twisty', 'twitchy', 'ugliness', 'ulna', 'umbrella', 'unappealing', 'unbearable', 'unchristened', 'uncle', 'understand', 'unkind', 'unremitting', 'upon', 'upset', 'upshot', 'useful', 'usher', 'utterable', 'vacation', 'vaccination', 'vacuum', 'valiant', 'vanish', 'various', 'varnish', 'vault', 'velcro', 'venomous', 'verbiage', 'version', 'vertical', 'very', 'veteran', 'villa', 'village', 'vinegar', 'violet', 'vital', 'vlogging', 'vocabulary', 'voice', 'volcano', 'voluntary', 'votive', 'vouch', 'wafer', 'wailing', 'waited', 'walk', 'wallet', 'walnut', 'wan', 'wand', 'wanted', 'warning', 'wasp', 'watch', 'water', 'wave', 'weakness', 'weaponry', 'weather', 'webisode', 'weevil', 'welcome', 'welding', 'well', 'west', 'wheedle', 'wheels', 'whelp', 'whereas', 'whiff', 'whine', 'whirlybird', 'whisk', 'whiskers', 'whittle', 'wholehearted', 'wide', 'wildcat', 'window', 'wink', 'winner', 'winnow', 'winsome', 'wishes', 'wistful', 'wistfully', 'wombat', 'workhorse', 'world', 'worrywart', 'worse', 'would', 'wrenches', 'yammer', 'Yankee', 'yarn', 'yearn', 'yeti', 'yippee', 'yonder', 'zebra', 'zither', 'zone', 'zoomed', 'zygote'] - -const mediumWords = ['aardvark', 'abaft', 'abated', 'aberration', 'abhorrence', 'abnegation', 'abominable', 'abracadabra', 'abroad', 'abrogate', 'absent', 'absolution', 'abstemious', 'abstruse', 'abysmal', 'acacia', 'accentuate', 'accident', 'accolade', 'accomplice', 'accrual', 'accumulate', 'accuse', 'acetaminophen', 'acetone', 'achromatic', 'acoustic', 'acquiesce', 'acquit', 'acrimony', 'acrostic', 'acrylics', 'acuity', 'acutely', 'adage', 'adhesion', 'adieu', 'adipose', 'adjective', 'adjudicate', 'administration', 'adolescence', 'adorned', 'adulation', 'aerobics', 'aerospace', 'affable', 'affectionately', 'affianced', 'affirmation', 'affluent', 'affront', 'afghan', 'agitation', 'agoraphobia', 'agrarian', 'agreement', 'agricultural', 'akimbo', 'alacrity', 'albeit', 'algae', 'alibi', 'allegiance', 'allergenic', 'alley', 'alliance', 'allocable', 'allowance', 'alloy', 'alluvial', 'alpaca', 'altercation', 'altitude', 'amalgam', 'amateurish', 'ambrosial', 'amiably', 'amino', 'ammunition', 'amnesty', 'amplify', 'amusing', 'anabolic', 'ancestors', 'anchorage', 'ancient', 'anemometers', 'angular', 'Angus', 'annexation', 'annihilate', 'annotate', 'annuity', 'annulment', 'anoint', 'anonymity', 'antacid', 'antagonistic', 'Antarctic', 'ante', 'antelope', 'anthropology', 'anticipatory', 'antidote', 'Antigua', 'antipathy', 'antiquarian', 'antiquated', 'antithesis', 'antsy', 'anxiety', 'aperture', 'apiary', 'apocalypse', 'apogee', 'apostate', 'apothecary', 'Appaloosa', 'apparatus', 'appellation', 'appetite', 'appointed', 'apportion', 'appraisal', 'approbatory', 'apropos', 'aqueduct', 'aqueous', 'arabesque', 'arbitrary', 'arboretum', 'archaism', 'archetype', 'archives', 'arduous', 'arid', 'arithmetic', 'armadillo', 'armaments', 'armature', 'armistice', 'arpeggio', 'arraign', 'arrange', 'arsenic', 'artery', 'artesian', 'artifice', 'artillery', 'ascension', 'aspect', 'aspirate', 'assailant', 'assembly', 'assiduous', 'assistance', 'associated', 'assumption', 'assure', 'asthmatic', 'astringent', 'asylum', 'ataxia', 'atomic', 'atrium', 'atrocious', 'attributive', 'auburn', 'auction', 'audacious', 'audience', 'auditorium', 'augment', 'aureole', 'auricular', 'auspices', 'austere', 'authenticate', 'autographs', 'automated', 'avalanche', 'avarice', 'avatar', 'avian', 'avoid', 'axiomatic', 'Aztec', 'bachelorette', 'backgammon', 'baleen', 'ballistic', 'ballyhooed', 'balsamic', 'Baltic', 'banal', 'bandicoot', 'banners', 'banquet', 'barograph', 'baroque', 'barracks', 'barrier', 'basaltic', 'basically', 'bassoon', 'basting', 'bastion', 'batteries', 'bazooka', 'beacons', 'beatific', 'beautician', 'bedraggled', 'beguile', 'behemoth', 'Belgium', 'bellwether', 'beneficent', 'bereavement', 'beret', 'berserk', 'berth', 'besieged', 'besmirch', 'bestial', 'betrothal', 'bicameral', 'bicycle', 'billiards', 'billow', 'binary', 'binoculars', 'binomial', 'biome', 'biscuit', 'bison', 'bittern', 'blarney', 'blatant', 'blazer', 'blindfolded', 'blissfully', 'blustery', 'Bohemian', 'bombastic', 'bona', 'bonsai', 'bookmobile', 'borough', 'botany', 'bough', 'boulevards', 'bountiful', 'bouquet', 'bowsprit', 'bracelet', 'brachiopods', 'braggart', 'braille', 'brambles', 'bravado', 'brayed', 'brazenness', 'breakfast', 'breeze', 'brethren', 'bridge', 'briny', 'brochure', 'brogue', 'bromide', 'bubonic', 'buffet', 'bulbous', 'bulletin', 'bulwark', 'buoyancy', 'bureau', 'burglarious', 'burial', 'burlap', 'bushel', 'bustling', 'button', 'cabaret', 'cadaverous', 'cadence', 'caffeine', 'calabash', 'calamari', 'calculator', 'calendar', 'calibrate', 'calisthenics', 'callow', 'calmed', 'calories', 'cambric', 'campaign', 'Canada', 'canal', 'candelabrum', 'cannonade', 'canopy', 'cantankerous', 'capable', 'capacity', 'capillary', 'capstan', 'capsule', 'captivated', 'caramel', 'carbohydrates', 'carcinogenic', 'cardigan', 'cardiopathy', 'caricature', 'carnage', 'carnitas', 'caroling', 'carolling', 'carpal', 'carpenter', 'carriage', 'cartilage', 'carving', 'cashier', 'Cassandra', 'casserole', 'castle', 'casualty', 'cataclysmic', 'catalepsy', 'catalina', 'catalyst', 'cathedral', 'cattle', 'cauterize', 'cautioned', 'cavalcade', 'caveat', 'caverns', 'cavity', 'cayenne', 'cedar', 'celebratory', 'celery', 'celestial', 'cellophane', 'Celsius', 'cemetery', 'cenotaph', 'census', 'centenary', 'centipede', 'centuries', 'ceramics', 'cerebellum', 'certain', 'certitude', 'chai', 'chalk', 'challenge', 'chambray', 'chancellor', 'channel', 'chapel', 'chaperonage', 'charioteer', 'charismatic', 'charlotte', 'Charon', 'charred', 'chastise', 'chef', 'chemise', 'chemistry', 'cherubic', 'Chesapeake', 'chestnut', 'Chihuahua', 'chimney', 'chinook', 'chintzy', 'chisel', 'chives', 'cholera', 'cholesterol', 'choreographer', 'chortle', 'chromosome', 'chronometer', 'chrysalis', 'churlish', 'churros', 'ciao', 'cicada', 'cinders', 'cinematic', 'cinnamon', 'circadian', 'circuitous', 'circumflex', 'circumscribe', 'cistern', 'citronella', 'civet', 'cladistics', 'clairvoyance', 'clambering', 'clandestine', 'clarinet', 'classical', 'classified', 'clatter', 'claustrophobia', 'clearance', 'cleat', 'clemency', 'clipper', 'clobbered', 'clodhopper', 'closet', 'Clydesdale', 'coalition', 'coarse', 'cobblestone', 'cocoa', 'coeval', 'cogently', 'cohesive', 'colic', 'colleagues', 'collegiality', 'collision', 'colonists', 'colubrine', 'columns', 'combination', 'combustible', 'comedienne', 'comestibles', 'comfort', 'commandeer', 'commerce', 'commissioner', 'committee', 'commodious', 'commonplace', 'commotion', 'commute', 'comparison', 'compatriots', 'compendium', 'complacency', 'complementary', 'complete', 'complicated', 'complicit', 'comportment', 'compunction', 'concatenate', 'conceit', 'concentrate', 'conch', 'concise', 'conclave', 'concoct', 'concomitant', 'concordance', 'condemn', 'condensation', 'conduit', 'confection', 'conference', 'confused', 'conglomerate', 'congratulate', 'conkers', 'consecrate', 'consecutive', 'consequent', 'consortium', 'constabulary', 'constellation', 'consternation', 'consul', 'contemptuous', 'continental', 'contingent', 'continuum', 'contorted', 'contradictory', 'contraption', 'contrariwise', 'contrite', 'contrivance', 'contusion', 'conundrum', 'convalesce', 'convince', 'convocation', 'convulsive', 'coralline', 'corduroy', 'corgi', 'coriander', 'cornea', 'cornucopia', 'corollary', 'coronet', 'corpulent', 'corral', 'correctional', 'corridor', 'corrosive', 'corsage', 'cottage', 'countless', 'coupon', 'courage', 'coverage', 'coveralls', 'covetous', 'cradle', 'craggy', 'cranium', 'crease', 'credence', 'credulity', 'cribbage', 'cringed', 'crinoline', 'criteria', 'crockery', 'crocodile', 'crooked', 'cruciferous', 'cruel', 'crumpled', 'crustaceans', 'crux', 'cryogenic', 'cubicle', 'cudgel', 'cumbersome', 'cumulus', 'cupola', 'curator', 'curfew', 'curio', 'curmudgeon', 'cursive', 'curtains', 'curtly', 'cushion', 'custody', 'cutaneous', 'cutis', 'cutlery', 'cyanosis', 'cybernetics', 'cyclone', 'Cyclops', 'cylindrical', 'cymbals', 'cytoplasm', 'dainty', 'Dalmatian', 'dandle', 'dandruff', 'dangerous', 'dappled', 'davenport', 'debilitate', 'debris', 'debutante', 'decennial', 'decent', 'deceptively', 'dechlorinate', 'deciduous', 'decimal', 'declamatory', 'declension', 'decrepitude', 'dedicated', 'defensiveness', 'deference', 'defiant', 'definiendum', 'deglaciation', 'deities', 'delivery', 'delphinium', 'dementia', 'demerits', 'demographics', 'demonstrative', 'denizen', 'denominator', 'denticulate', 'dentifrice', 'dependable', 'deportment', 'depot', 'depravity', 'depreciate', 'depredation', 'deprivation', 'depths', 'derelict', 'derisive', 'deserter', 'desertification', 'designer', 'desolate', 'destination', 'desultorily', 'detect', 'detergent', 'deters', 'detritus', 'devious', 'devoid', 'diacritic', 'diadem', 'diagram', 'dialysis', 'Dianthus', 'diaper', 'diaphanous', 'diaspora', 'dictum', 'dietetic', 'differed', 'dignify', 'digression', 'dilapidated', 'diligence', 'diligent', 'diminished', 'dinero', 'dingoes', 'dinosaur', 'dire', 'discombobulate', 'discomfiture', 'discountenance', 'discreetly', 'discretionary', 'discussion', 'disembark', 'disengage', 'disguise', 'dishevel', 'disinfectant', 'dismal', 'disparate', 'disposition', 'disproportionate', 'dispute', 'disrepair', 'dissemble', 'dissipate', 'dissolved', 'dissonance', 'distance', 'distressed', 'disturbance', 'diurnal', 'diverge', 'divestiture', 'divvy', 'documentary', 'dodecahedron', 'dolce', 'doldrums', 'dolma', 'domain', 'domesticity', 'domiciled', 'dopamine', 'dormitories', 'doubloons', 'doubt', 'dovecote', 'dowager', 'draconian', 'dragoon', 'dramatization', 'dramaturgy', 'drape', 'drastic', 'dreadlocks', 'drivel', 'dromedary', 'drone', 'drowsy', 'dubiously', 'duchy', 'dulcet', 'dumbwaiter', 'duodenum', 'duopoly', 'duplicitous', 'durango', 'duress', 'dutifully', 'duvet', 'dynamite', 'dyspeptic', 'dystopia', 'earnestly', 'earthquake', 'ebullience', 'echelon', 'echinoderm', 'echoed', 'eclipse', 'ecstatic', 'ectoplasm', 'eczema', 'edamame', 'eddy', 'Edenic', 'edification', 'eerily', 'efface', 'effervescent', 'effete', 'effusive', 'egress', 'Egyptian', 'Einstein', 'elaborative', 'elation', 'electrode', 'elegant', 'element', 'elevator', 'elicitation', 'eligibility', 'elocution', 'eluate', 'elucidate', 'elusive', 'emancipatory', 'embassy', 'embezzlement', 'emblazoned', 'emboldened', 'embryo', 'emerald', 'emeritus', 'eminent', 'emissary', 'emitting', 'emperor', 'emphysema', 'empirical', 'emporium', 'emulate', 'emulsify', 'enchantment', 'encore', 'encroach', 'endocrine', 'endogenous', 'endorphin', 'endure', 'energetic', 'enervate', 'engineer', 'engineering', 'engraved', 'enlisted', 'enmity', 'enoki', 'enormous', 'ensconced', 'ensemble', 'entente', 'enthalpy', 'entity', 'entree', 'entrepreneur', 'enumerated', 'enunciate', 'enviable', 'environs', 'enzyme', 'epact', 'epicurean', 'epidermis', 'epidural', 'epigram', 'epilepsy', 'episcopal', 'episode', 'epistolary', 'epitaphs', 'epithet', 'epithets', 'epitome', 'epoch', 'epoxy', 'epsilon', 'equanimity', 'equator', 'equestrian', 'equilibrium', 'equinox', 'equivalent', 'equivocate', 'eradicate', 'ermine', 'errata', 'erroneous', 'erstwhile', 'eruption', 'escalator', 'escarole', 'escarpment', 'eschew', 'esoteric', 'espadrille', 'espial', 'espousal', 'essential', 'establishment', 'esteem', 'estuary', 'ethanol', 'etude', 'eucalyptus', 'euro', 'eustress', 'evaluate', 'evanescent', 'evaporation', 'evidence', 'ewer', 'exaggerate', 'exasperate', 'exception', 'excision', 'excursion', 'exemplar', 'exercise', 'exerts', 'exhaust', 'exhibition', 'exhibits', 'exodus', 'exoneration', 'exorbitant', 'expanse', 'expectorant', 'expensive', 'expiration', 'exploits', 'explore', 'expostulate', 'expression', 'expunge', 'exquisite', 'extant', 'extemporaneous', 'extensive', 'exterior', 'extinguish', 'extracurricular', 'extrapolate', 'extremely', 'eyesore', 'fabulist', 'factitious', 'factorial', 'fajitas', 'fallacy', 'faltered', 'fang', 'fanged', 'farcical', 'Farsi', 'fascinator', 'fatuously', 'faucet', 'fault', 'faux', 'fealty', 'fearsome', 'feasibility', 'feckless', 'fecund', 'feign', 'felonious', 'fenestrated', 'ferret', 'fervently', 'festooned', 'feta', 'feudalism', 'fez', 'fibromyalgia', 'fibula', 'fide', 'fidgeting', 'fido', 'fiduciary', 'fiercest', 'figurative', 'filbert', 'filial', 'financier', 'firefly', 'firmament', 'fiscal', 'fission', 'fisticuffs', 'flabbergast', 'flagon', 'flambe', 'flaxen', 'fleetness', 'flexitarian', 'flimflammer', 'flimsy', 'flippancy', 'Florentine', 'floribunda', 'flotsam', 'flourish', 'fluctuation', 'fluency', 'fluoride', 'flurry', 'foible', 'foliage', 'follicle', 'fomentation', 'fondant', 'fontina', 'foolishness', 'foosball', 'forestallment', 'forfeit', 'formation', 'Formica', 'FORTRAN', 'fountain', 'fracas', 'fragment', 'Franciscan', 'Francophone', 'fraudulent', 'freegan', 'freesia', 'freneticism', 'Frisbee', 'frisket', 'frittata', 'frontier', 'froufrou', 'froward', 'frugal', 'fucoid', 'fulminate', 'funambulist', 'fungible', 'funnel', 'furrow', 'furthermore', 'futility', 'gabled', 'gadgets', 'Galahad', 'gallant', 'gallop', 'galvanize', 'gamma', 'garish', 'garland', 'garnet', 'garniture', 'gastronome', 'gaucho', 'gaudery', 'gauze', 'gazette', 'Gemini', 'genealogical', 'generation', 'genome', 'genteel', 'genus', 'geocaching', 'geometry', 'geriatric', 'germane', 'gesticulate', 'gesture', 'ghastly', 'gibbous', 'gilded', 'gingerbread', 'gingivitis', 'Gippsland', 'gladiatorial', 'glazed', 'glengarry', 'glib', 'glissando', 'glisten', 'glitterati', 'globular', 'gluttonous', 'gnarled', 'gnaw', 'gnocchi', 'goblins', 'Goliath', 'gonzo', 'gosling', 'gossamer', 'Gothamite', 'Gouda', 'gouge', 'gourd', 'grammarian', 'grandeur', 'grandiloquent', 'granite', 'granules', 'grapheme', 'graphologist', 'grateful', 'gratingly', 'gratis', 'Gregorian', 'grievance', 'grocery', 'grotesqueness', 'grudgingly', 'gubernatorial', 'guineas', 'gullibility', 'gurney', 'gustatory', 'guttural', 'gypsum', 'habanero', 'hackles', 'hackneyed', 'haggis', 'hairpin', 'halibut', 'Halifax', 'hallowed', 'hallucinate', 'halter', 'handiwork', 'hangar', 'haphazard', 'harbinger', 'Harlem', 'harrumph', 'hasten', 'havoc', 'hazmat', 'Hebrides', 'hedgehog', 'heliotrope', 'helmet', 'heptad', 'heralded', 'herbaceous', 'Herculean', 'heredity', 'hermetically', 'hermitage', 'herring', 'herringbone', 'heterophony', 'hexagonal', 'hiatus', 'hibernaculum', 'hideout', 'hieroglyphics', 'Hippocratic', 'hipsterism', 'histrionics', 'hoarsely', 'hollyhock', 'Holocaust', 'Holstein', 'homage', 'homeostasis', 'homicide', 'homiletics', 'hornet', 'horrid', 'hostile', 'hovel', 'hover', 'hubris', 'huerta', 'hull', 'humerus', 'humidistat', 'hurriedly', 'hushed', 'hyacinth', 'hybrid', 'hydrangea', 'hydrant', 'hydrocortisone', 'hydrophobia', 'hydroponic', 'hypochondria', 'hypogeous', 'hypotenuse', 'hyrax', 'iambic', 'Iberian', 'ibex', 'ibuprofen', 'Icarus', 'Icelandic', 'idiolect', 'idiosyncratic', 'idyllic', 'ignominious', 'illicitly', 'illustrious', 'imminent', 'immolate', 'impact', 'impasto', 'impeachable', 'impecunious', 'impediment', 'imperious', 'impermeable', 'impetus', 'implacable', 'implicative', 'implore', 'importunate', 'imposing', 'impoverish', 'impresario', 'impromptu', 'improvise', 'incantations', 'incident', 'incinerate', 'inclement', 'inclined', 'inclusion', 'incoherent', 'inculcate', 'indecipherable', 'indefatigable', 'indemnity', 'indent', 'indict', 'indie', 'indifference', 'indigent', 'indolent', 'indubitable', 'inducement', 'indulgent', 'industrial', 'ineffable', 'ineluctable', 'ineptitude', 'inerrancy', 'infarction', 'infatuation', 'inflammable', 'infraction', 'infuriating', 'ingenuous', 'inglorious', 'ingot', 'ingratiate', 'inimical', 'injurious', 'inlaid', 'inlet', 'innovator', 'inoculate', 'inquietude', 'inquisitor', 'insect', 'insignia', 'inspector', 'installation', 'instantaneous', 'instigate', 'instrument', 'insubstantial', 'insulin', 'integument', 'intensify', 'interim', 'interjected', 'interlocutor', 'intermezzo', 'interred', 'interregnum', 'interrogative', 'intersect', 'intersperse', 'intricate', 'intuitable', 'inundate', 'invasions', 'invective', 'invertebrate', 'investigation', 'inveterate', 'invigorating', 'inviolable', 'invitation', 'inwardly', 'irascible', 'iridescent', 'irregular', 'irrevocable', 'irrigation', 'irritability', 'isosceles', 'isotopic', 'italicization', 'jadeite', 'jalapeno', 'jalapeño', 'jambalaya', 'Jamestown', 'jasper', 'Javas', 'javelin', 'jeepney', 'jettison', 'jingoism', 'jitney', 'jocularity', 'joists', 'jonquil', 'joule', 'judicious', 'juncture', 'Juneteenth', 'Jurassic', 'jurisdiction', 'justiciable', 'juvenilia', 'juxtapose', 'kaiser', 'kaleidoscope', 'karst', 'Kelvin', 'keratitis', 'kerchief', 'kettle', 'kleptocrat', 'kookaburra', 'koto', 'kraken', 'krypton', 'laboratory', 'laborious', 'labradoodle', 'laburnums', 'labyrinthine', 'laceration', 'lackadaisical', 'laconic', 'lairs', 'laity', 'laminate', 'lanai', 'lanceolate', 'languish', 'languorous', 'lapel', 'larceny', 'latency', 'laudatory', 'laughter', 'launch', 'laureate', 'lavender', 'lavished', 'lazily', 'legalese', 'legato', 'legend', 'legerity', 'Leghorn', 'legionnaire', 'legislature', 'legitimately', 'leguminous', 'leisure', 'lento', 'leviathan', 'levied', 'liaise', 'licensure', 'liege', 'ligament', 'Limburger', 'limousine', 'limpa', 'limpid', 'Lincoln', 'linen', 'liquefaction', 'listlessly', 'litmus', 'lobotomy', 'logarithmic', 'logographic', 'lolled', 'loneliness', 'longitude', 'loquacious', 'lorikeet', 'louche', 'Louisiana', 'loyal', 'lozenge', 'lucrative', 'luggage', 'lugubrious', 'lukewarm', 'lullaby', 'lumbar', 'lumen', 'luminance', 'lupine', 'luxuriate', 'lyre', 'macaroon', 'macaw', 'macchiato', 'machete', 'machination', 'mackerel', 'macrobiotics', 'macrocosm', 'macular', 'mademoiselle', 'mahogany', 'maidenhair', 'mailboxes', 'maize', 'majuscule', 'malacology', 'malaise', 'malapropism', 'malevolent', 'malfeasance', 'malinger', 'malleable', 'mammalian', 'Mandarin', 'mandrill', 'manipulable', 'manner', 'mansard', 'manticore', 'mantle', 'mantra', 'manumit', 'manure', 'marbles', 'marimba', 'marionette', 'mariposa', 'maritime', 'marmoset', 'marooned', 'Mars', 'marsh', 'marsupial', 'mason', 'masseuse', 'masthead', 'mastiff', 'mastodon', 'matriculation', 'matrimony', 'matron', 'mauve', 'maverick', 'mawkish', 'Mecca', 'mediaeval', 'meeting', 'megalomaniac', 'melamine', 'melismatic', 'mellifluous', 'memorial', 'menagerie', 'mendacious', 'menial', 'meningitis', 'menthol', 'mention', 'mephitic', 'merely', 'merganser', 'meridian', 'merino', 'Mesopotamian', 'messenger', 'metastasize', 'metatarsal', 'metropolis', 'Mexico', 'mezzanine', 'miasma', 'microfiche', 'microscope', 'microwave', 'middle', 'mildew', 'millennial', 'millivolt', 'mimeograph', 'mimetic', 'ministrations', 'minivan', 'minnow', 'Minotaur', 'minutia', 'Miranda', 'miscible', 'misconstrue', 'mislead', 'misnomer', 'mitigative', 'mitochondria', 'mittimus', 'mobility', 'mochi', 'modern', 'modicum', 'modular', 'Mohawk', 'molars', 'molasses', 'molecule', 'mollify', 'momentous', 'monitory', 'monochrome', 'monocle', 'montage', 'moorage', 'moratorium', 'mordant', 'moribund', 'Moroccan', 'morose', 'morphological', 'mortgage', 'mosaic', 'mossy', 'mournful', 'mousse', 'muesli', 'mulberry', 'mulish', 'mulligan', 'multifarious', 'multiplication', 'multitude', 'multivalent', 'mummified', 'Munich', 'municipal', 'museum', 'musician', 'mustard', 'mutate', 'mutual', 'Muzak', 'mycology', 'Mylar', 'myoglobin', 'myopic', 'mystic', 'nada', 'Namibian', 'nannies', 'nanotechnology', 'napoleon', 'narcoleptic', 'narrow', 'nattily', 'naturalist', 'nausea', 'nautilus', 'Neapolitan', 'nebulous', 'necessity', 'necrotic', 'nectarine', 'neglected', 'neonatology', 'Nepal', 'nepotism', 'Neptune', 'nervily', 'nervous', 'netiquette', 'neuropathy', 'neuroticism', 'neutron', 'Newfoundland', 'newlyweds', 'nexus', 'niacin', 'niche', 'Nile', 'nimbostratus', 'noctambulist', 'nocturnal', 'nodosity', 'nomenclature', 'nominal', 'nonchalance', 'nonconformist', 'nonnegotiable', 'nonviolent', 'nonvolatile', 'Norse', 'nostalgia', 'Nostradamus', 'notification', 'notoriety', 'nouveau', 'novemdecillion', 'novice', 'noxious', 'nubuck', 'nucleated', 'nudged', 'numerology', 'nursery', 'nutation', 'nutria', 'nutrients', 'nymphal', 'obelisk', 'obfuscate', 'obituary', 'oblige', 'oblique', 'obliterate', 'oblivious', 'obscure', 'obsidian', 'obstacles', 'obstetrician', 'obstreperous', 'obvious', 'occipital', 'occultation', 'occupancy', 'occur', 'oculus', 'odiferous', 'odometer', 'offer', 'officiant', 'officinal', 'ogre', 'okapi', 'olfactory', 'oligarchy', 'olingo', 'olympiad', 'ombudsman', 'omnibus', 'omniscient', 'oncoming', 'onerous', 'onomatopoeia', 'onus', 'oompah', 'oozing', 'opalescence', 'operator', 'opinionated', 'opponent', 'opposite', 'opprobrious', 'optimum', 'optometry', 'opulent', 'opus', 'oracle', 'orchestra', 'ordinance', 'Oregon', 'organelle', 'organist', 'oriel', 'orientation', 'ornithology', 'orthogonal', 'oscillation', 'osculatory', 'osmosis', 'osprey', 'ostensibly', 'osteopath', 'ostracism', 'ostriches', 'ottoman', 'outright', 'oval', 'overweening', 'oxygenate', 'pachyderm', 'Pacific', 'pageantry', 'pagoda', 'paisley', 'Pakistan', 'palatable', 'palatial', 'palazzo', 'Paleozoic', 'palliative', 'pallor', 'palpitant', 'panacea', 'panache', 'pancetta', 'pancreas', 'pantheon', 'pantomime', 'papillon', 'papyrus', 'parable', 'parabola', 'paragon', 'paramecium', 'parameters', 'paramountcy', 'parcel', 'pariah', 'parkour', 'parley', 'parliamentary', 'parochial', 'parodic', 'parsimony', 'parsnips', 'particulate', 'partridge', 'pashmina', 'passersby', 'pastry', 'pastures', 'Patagonia', 'patella', 'patent', 'pathogen', 'pathos', 'patience', 'patrician', 'patronymic', 'paucity', 'pauper', 'pavement', 'pavlova', 'pearlescent', 'peculate', 'peculiar', 'pecuniary', 'pedantry', 'pedestals', 'pedestrian', 'pedicure', 'pelf', 'pelican', 'Pembroke', 'pendulous', 'penitentiary', 'pensive', 'peony', 'peradventure', 'perceptible', 'peremptory', 'perfection', 'performance', 'perfume', 'perhaps', 'perilous', 'perimeter', 'peripheral', 'permutation', 'perpetrator', 'perpetual', 'perquisite', 'perseverance', 'personnel', 'perspicacious', 'persuasible', 'peruse', 'pervasive', 'pestilence', 'petite', 'petrifying', 'petroglyphs', 'petroleum', 'phalanges', 'pharaoh', 'pharmacy', 'pharynx', 'phenotype', 'philharmonic', 'Philistine', 'philosophize', 'phishing', 'phlebotomy', 'phlegmatic', 'phlox', 'phoenix', 'phonetician', 'phonics', 'phosphorescent', 'photogenic', 'phraseology', 'phycology', 'phylum', 'physicists', 'Pierre', 'piety', 'pilaster', 'pileus', 'pilgrimages', 'pilosity', 'pilotage', 'pineapple', 'pinnacle', 'pinpoint', 'pious', 'pitiful', 'pituitary', 'placards', 'placate', 'placoderm', 'plague', 'plaid', 'plaiting', 'planetarium', 'planisphere', 'planogram', 'plantain', 'plantations', 'plastic', 'platinum', 'platitude', 'platoon', 'plaudits', 'playlist', 'plenitude', 'plethora', 'pliant', 'pluck', 'Plumeria', 'plundered', 'plush', 'poblano', 'podium', 'Podunk', 'police', 'pollutant', 'polonium', 'polyester', 'polyglot', 'polypeptide', 'polysemy', 'polysyllabic', 'pomegranate', 'Pomeranian', 'pomposity', 'pontiff', 'ponytail', 'populace', 'porcelain', 'porosity', 'portcullis', 'portentous', 'portico', 'portrait', 'posada', 'posh', 'posse', 'possessive', 'posthumous', 'potassium', 'pothos', 'potpourri', 'pouted', 'practically', 'praxis', 'preamble', 'precise', 'precursor', 'predicament', 'preeminent', 'preened', 'preferential', 'prehensile', 'prejudice', 'preliminary', 'premonition', 'prenuptial', 'preponderance', 'preposterous', 'president', 'pressure', 'presumptuous', 'prevenient', 'previous', 'primers', 'primeval', 'primitive', 'princeps', 'principality', 'prion', 'probative', 'procedure', 'procrastinate', 'procurement', 'prodigious', 'produce', 'professional', 'profile', 'profound', 'profundity', 'proletarian', 'prolix', 'Promethean', 'prominent', 'promontory', 'promptly', 'promulgate', 'propinquity', 'proprietary', 'propulsion', 'prorogue', 'prosperous', 'prosthetic', 'protectorate', 'protested', 'protuberant', 'proud', 'proverb', 'provincial', 'proviso', 'prowess', 'prudence', 'pruners', 'psalmody', 'psychoanalysis', 'pterodactyl', 'pugilist', 'pugnacious', 'Pulitzer', 'pulse', 'pumice', 'punctuation', 'pungent', 'puniness', 'puree', 'purification', 'purpose', 'purse', 'pursuit', 'putrescent', 'pyramid', 'pyrite', 'pyrotechnics', 'quadriceps', 'quadrilateral', 'quadrillion', 'quagmire', 'qualms', 'quandary', 'quarantine', 'quasar', 'quashed', 'quaver', 'quiddity', 'quince', 'quintessential', 'quirky', 'quittance', 'quizzical', 'quorum', 'quotidian', 'quotient', 'QWERTY', 'rabbinic', 'racial', 'racketeer', 'raclette', 'radiation', 'rallies', 'rambunctious', 'ramifications', 'ramparts', 'ransom', 'rappelled', 'rationale', 'rattled', 'raucous', 'ravine', 'realm', 'Realtor', 'reasonable', 'rebarbative', 'rebuff', 'receptions', 'reciprocity', 'reconcilable', 'record', 'recreant', 'recriminatory', 'recruit', 'rectitude', 'recuperation', 'recusancy', 'redolent', 'reduce', 'redux', 'referendum', 'refrain', 'regalia', 'regents', 'reggae', 'regicide', 'registrar', 'regurgitate', 'rehearsal', 'reimbursable', 'reiterate', 'rejuvenate', 'relative', 'relentlessly', 'reminiscent', 'remonstrance', 'remorseful', 'remuneration', 'rendition', 'rennet', 'renowned', 'reparations', 'replete', 'repository', 'reprieve', 'reprisal', 'repudiate', 'Requiem', 'requisition', 'residence', 'residue', 'resilience', 'resonate', 'resplendence', 'resume', 'resuscitate', 'reticulated', 'retinal', 'retinol', 'retreat', 'retrodict', 'retrograde', 'revelation', 'revenant', 'reverberant', 'revulsive', 'rhapsody', 'rhododendron', 'rhombus', 'rhubarb', 'rhythmically', 'rialto', 'ricochet', 'ricotta', 'rictus', 'ritziness', 'rivalry', 'riviera', 'Romano', 'rookie', 'roseola', 'rosin', 'rotating', 'rotisserie', 'roundabout', 'roustabout', 'rowan', 'rubble', 'rudiments', 'ruins', 'ruminate', 'runes', 'rustication', 'rustle', 'rutabaga', 'sabbatical', 'sabermetrics', 'sabotage', 'sacrament', 'sacrifice', 'sacrosanct', 'sagacious', 'salamanders', 'salience', 'salinity', 'salivate', 'salubrious', 'salutary', 'Salvador', 'salvation', 'samples', 'sanctimonious', 'sandal', 'sanitized', 'sapphire', 'sarcophagus', 'sardine', 'sardonic', 'sartorial', 'sashay', 'saskatoon', 'satchel', 'scale', 'Scandinavia', 'scanner', 'scarab', 'scarcely', 'scarf', 'scarlatina', 'scattering', 'scavenger', 'scenery', 'scenographer', 'schedule', 'schism', 'schnitzel', 'scholarship', 'schooner', 'sciatica', 'sclerosis', 'scoff', 'sconces', 'scorpion', 'scoundrel', 'scrambling', 'scraped', 'scrawny', 'scrimshaw', 'scrolls', 'scrooge', 'scrumptiously', 'scrutiny', 'scuba', 'scuffle', 'scullery', 'sculpture', 'scythe', 'secession', 'seclusion', 'security', 'sedge', 'sediment', 'seethe', 'segregation', 'seismologist', 'seize', 'semester', 'semicolon', 'senator', 'sententious', 'sentries', 'septennial', 'sequential', 'sequester', 'seraphic', 'serenade', 'series', 'serious', 'serrated', 'servitude', 'sesame', 'sessile', 'seton', 'settee', 'settle', 'severance', 'severely', 'sewage', 'shabby', 'sheathed', 'Sheetrock', 'sheldrake', 'shelves', 'shenanigans', 'shepherd', 'sheriff', 'shilling', 'shimmery', 'shingle', 'shoji', 'shortage', 'shrine', 'shuffle', 'shui', 'siblings', 'sieve', 'signatory', 'silhouette', 'simpatico', 'simplicity', 'simulate', 'simultaneity', 'sinister', 'sitcom', 'situation', 'slalom', 'slate', 'slobbery', 'slovenly', 'slumgullion', 'smithereens', 'smorgasbord', 'smudge', 'sneer', 'snorkels', 'snout', 'sobriety', 'solar', 'solder', 'solemn', 'solicit', 'solitaire', 'solstice', 'somatotype', 'soothsayer', 'sophisticated', 'sophomoric', 'soporific', 'soprano', 'sorrel', 'sortition', 'sostenuto', 'sousaphone', 'sparsely', 'spasmodic', 'spatula', 'speak', 'specimen', 'specious', 'spectacles', 'spectrometer', 'speculate', 'spinosity', 'spinster', 'spiracle', 'spirit', 'spleen', 'splenetic', 'splutter', 'spoken', 'spontaneity', 'spoonerism', 'sporadically', 'sprawl', 'sprinkle', 'spurious', 'squabbling', 'squalid', 'squander', 'squawk', 'squid', 'squints', 'stagflation', 'staggered', 'staid', 'stalwart', 'stamina', 'stampede', 'standoff', 'stanzaic', 'starvation', 'static', 'station', 'statistician', 'statuesque', 'stegosaur', 'stenographer', 'steppe', 'stereotypical', 'sternum', 'sternutation', 'steroid', 'stevia', 'stigmata', 'Stilton', 'stimuli', 'stipulate', 'stoats', 'stomach', 'strait', 'stratagems', 'stratification', 'stratosphere', 'streamlet', 'strengthen', 'stretcher', 'striation', 'stricture', 'stridency', 'strident', 'stroganoff', 'strum', 'stupefy', 'subaqueous', 'subcutaneous', 'subdivision', 'subliminal', 'submersible', 'subsequent', 'substitute', 'subterranean', 'subtitles', 'subtlety', 'succinct', 'succulent', 'succumb', 'sudoku', 'suet', 'sufficiency', 'suffrage', 'suitable', 'sullen', 'sultana', 'Sumatran', 'summary', 'summit', 'sundering', 'sundry', 'superb', 'superficiality', 'superlative', 'superstitious', 'supine', 'supplicate', 'supremacy', 'surety', 'surface', 'surimi', 'surmised', 'surmountable', 'surplus', 'surrealist', 'surreptitious', 'surrogate', 'surrounded', 'surveyed', 'survival', 'suspicion', 'sustenance', 'suture', 'swannery', 'swerve', 'sycophant', 'syllabus', 'symbol', 'symmetrical', 'sympathy', 'symposium', 'syndicate', 'syringe', 'Tabasco', 'tabernacle', 'tableau', 'tachycardia', 'taciturn', 'tactics', 'talisman', 'talons', 'tampered', 'tandoori', 'tangents', 'tangerine', 'tapas', 'tapestry', 'tapioca', 'tarantula', 'tardigrade', 'tarry', 'tarsier', 'tartan', 'tase', 'Tasmanian', 'tautology', 'taverna', 'taxonomic', 'teak', 'technician', 'technique', 'tectonic', 'tedious', 'teeter', 'teleology', 'telepathic', 'telescope', 'temerity', 'tempeh', 'tempestuous', 'temple', 'tempura', 'tenaciously', 'tenement', 'tennis', 'tensile', 'tentativeness', 'tephra', 'tepidity', 'terabyte', 'teraphim', 'tercentenary', 'terminus', 'terraced', 'terrier', 'territory', 'testament', 'testimony', 'tetanus', 'texture', 'thaumaturge', 'theorem', 'thermos', 'thespian', 'thicket', 'thievery', 'thoracic', 'thoroughbred', 'thrasonical', 'throat', 'throttle', 'throughout', 'thwartwise', 'thyme', 'tincture', 'Tinseltown', 'tiramisu', 'tissue', 'toga', 'toile', 'toilsome', 'tomahawk', 'tomes', 'tomfoolery', 'tonic', 'tonsillitis', 'topgallant', 'topiary', 'toploftical', 'toppled', 'torrent', 'torsion', 'tortoise', 'tourists', 'tracheotomy', 'tractability', 'tragedian', 'tranquil', 'transcend', 'transcription', 'transference', 'transistor', 'transit', 'transparencies', 'transporting', 'transposable', 'travails', 'traverse', 'treatise', 'treble', 'trebuchet', 'trefoil', 'trellis', 'trembling', 'tremendous', 'tremulous', 'trepanation', 'trepidation', 'trespass', 'tribunal', 'tributary', 'triceratops', 'trickster', 'trifecta', 'trifle', 'triforium', 'triglycerides', 'trigonometry', 'trillium', 'tripartite', 'triplicate', 'triste', 'trituration', 'trombone', 'tropical', 'trounce', 'trowel', 'truculence', 'truffle', 'truncate', 'truncheon', 'tubular', 'tuffet', 'tuition', 'tumbling', 'tungsten', 'tupelo', 'turbulent', 'turmeric', 'turophile', 'turpentine', 'turpitude', 'tutelage', 'tuxedo', 'twilight', 'tympanum', 'tyrannical', 'udon', 'ufology', 'ulterior', 'ultimatum', 'umbilical', 'umbrage', 'unabated', 'unanimous', 'unappealing', 'unconscionable', 'uncouth', 'unctuous', 'undergird', 'undesirable', 'undulating', 'unfurl', 'unilaterally', 'unison', 'university', 'univocal', 'unkempt', 'unmoored', 'unnoticed', 'unscathed', 'untenable', 'untoward', 'upbraid', 'uranium', 'urbanely', 'urgency', 'ursine', 'usual', 'usurper', 'utensils', 'utilitarian', 'uveal', 'uvula', 'vacancy', 'vacillate', 'vacuousness', 'vagabonds', 'vagary', 'vague', 'vainglorious', 'valedictorian', 'valuables', 'valuator', 'vandalize', 'vane', 'vanguard', 'vanity', 'vanquish', 'vantage', 'varicella', 'varicose', 'variegated', 'varsity', 'vascular', 'vassal', 'Vatican', 'vaudeville', 'veganism', 'vegetarian', 'vegetation', 'vehemence', 'vehicular', 'vellum', 'velociraptor', 'venerable', 'vengeance', 'venial', 'Venice', 'ventricle', 'ventriloquy', 'ventured', 'venue', 'veracity', 'verbatim', 'verbena', 'verism', 'veritable', 'vermicide', 'vernal', 'versatile', 'vertebral', 'vertical', 'vertigo', 'vespertine', 'vestibule', 'vetiver', 'vexatious', 'viaticum', 'vibrant', 'vicarious', 'vicinity', 'victimology', 'Victorian', 'vignette', 'Viking', 'village', 'vincible', 'vindictive', 'vinegar', 'vineyard', 'vinyl', 'violet', 'violin', 'virtually', 'virulence', 'visage', 'viscount', 'visibility', 'vitreous', 'vitriolic', 'vituperative', 'vivacious', 'vividly', 'vocabulary', 'volatile', 'volition', 'vortices', 'waiver', 'Wales', 'wallaby', 'wardrobe', 'warmth', 'warrior', 'wattage', 'wattles', 'wayward', 'wearisome', 'weird', 'welterweight', 'wentletrap', 'whales', 'wharf', 'wherewithal', 'whet', 'whimper', 'whimsical', 'widdershins', 'wilco', 'wildebeest', 'wily', 'window', 'wisdom', 'withered', 'withers', 'wizard', 'wizened', 'woebegone', 'wordmonger', 'world', 'wraith', 'wreaked', 'wreath', 'wren', 'wretched', 'writers', 'wunderkind', 'wushu', 'yeanling', 'yeoman', 'yoga', 'Yorkshire', 'yuzu', 'Zamboni', 'zealous', 'zeppelin', 'zirconium', 'zodiac', 'zoolatry'] - -const hardWords = ['abalones', 'abattoir', 'abdomen', 'abeyance', 'absorptive', 'abundance', 'acacias', 'accelerates', 'accompli', 'accordance', 'acequia', 'adduced', 'Adelaide', 'Adelie', 'adiabatic', 'adjutant', 'adrenergic', 'adscititious', 'adumbrate', 'adversity', 'adzuki', 'aerials', 'Aesopian', 'affectionately', 'affenpinscher', 'agate', 'aggrandizement', 'agitprop', 'Aglaia', 'agnolotti', 'agnomen', 'ague', 'ahimsa', 'aioli', 'Airedale', 'aisles', 'alacrity', 'Albion', 'Algiers', 'allegiance', 'allelopathy', 'alliance', 'almoner', 'alpinist', 'altazimuth', 'amaryllis', 'ammonite', 'amputation', 'amygdala', 'anagrams', 'analgesia', 'anaphylaxis', 'anathema', 'andouille', 'anecdote', 'anechoic', 'anemone', 'anent', 'anguish', 'anhinga', 'aniseikonia', 'ankh', 'annexation', 'annoyance', 'anodyne', 'antidote', 'antiquated', 'aperçu', 'aperture', 'apocryphal', 'Apollo', 'apoplexy', 'aporia', 'aposematic', 'appalling', 'apparition', 'appeasement', 'appendectomy', 'appositive', 'apprentice', 'appropriate', 'appurtenances', 'apres', 'aquiline', 'Aramaic', 'arcane', 'arenaceous', 'argot', 'arrayed', 'arrondissement', 'arthralgia', 'artillery', 'ascetic', 'ascites', 'asparagus', 'aspersions', 'asphyxiate', 'aspidistra', 'assailant', 'assassinate', 'assuage', 'astrologers', 'Aten', 'atlatl', 'atmospheric', 'atoll', 'atrocity', 'attache', 'aughts', 'auspices', 'austere', 'auteur', 'authority', 'autophagy', 'avalanche', 'aversion', 'avgolemono', 'avian', 'avifauna', 'avocations', 'avuncular', 'azalea', 'azulejo', 'badinage', 'badminton', 'bailiwick', 'balata', 'balbriggan', 'bankrupt', 'bantam', 'bantlings', 'Barnumesque', 'barrette', 'barricade', 'Basenji', 'basilica', 'bathos', 'battalion', 'battue', 'Bauhaus', 'bauxite', 'bayonet', 'Bayreuth', 'bechamel', 'becquerel', 'bedlam', 'beelzebub', 'Beethovenian', 'Benedictine', 'benison', 'bestial', 'betise', 'betony', 'beurre', 'bhangra', 'bialy', 'bibelot', 'bibimbap', 'bibliopegist', 'bier', 'bijouterie', 'bilious', 'bindi', 'bipolar', 'bireme', 'bitumen', 'bivouac', 'blancmange', 'blastema', 'blatherskite', 'blight', 'Bloomsbury', 'bloviate', 'bobolink', 'bodhran', 'boisterously', 'bolide', 'Bolognese', 'bonspiel', 'bordereaux', 'boroughs', 'boudin', 'bouffant', 'bouillon', 'boulevardier', 'boulevards', 'bourgeois', 'boutonniere', 'brevet', 'brigands', 'brioche', 'brocade', 'brucellosis', 'brume', 'buccal', 'bucolic', 'buffa', 'Bundt', 'Bunyanesque', 'burglarious', 'burgundy', 'Burkinabe', 'cabal', 'cabaletta', 'cabochon', 'cachexia', 'caisson', 'calamine', 'calamitous', 'caldera', 'callous', 'calumny', 'camarilla', 'camembert', 'canaille', 'canard', 'cantatrice', 'Cantonese', 'capoeira', 'capsaicin', 'carabinieri', 'Caracas', 'carapace', 'caravel', 'Carlisle', 'carmagnole', 'carnitine', 'carrion', 'carte', 'Carthusian', 'cartouches', 'caryatid', 'cassock', 'castellated', 'Castilian', 'catachresis', 'cataphora', 'catarrh', 'catastrophic', 'cathect', 'cavalcade', 'caveola', 'cayenne', 'celerity', 'cenote', 'cephalopod', 'cetology', 'chalet', 'chalice', 'champignon', 'chandeliers', 'chandleries', 'chanteuse', 'Chantilly', 'chaplain', 'charcuterie', 'charismatic', 'chasuble', 'Chaucerian', 'chauffeurs', 'cheongsam', 'chevalier', 'chicanery', 'chicle', 'chiffonade', 'chimpanzee', 'choucroute', 'chrysolite', 'churlish', 'cicatrize', 'cicerone', 'Cincinnati', 'cinerarium', 'cioppino', 'cirri', 'cladding', 'clamorous', 'clandestine', 'claustrophobic', 'clavichord', 'clematis', 'clerihew', 'cloisters', 'clouting', 'cnidarian', 'coadjutor', 'coalescence', 'coaxing', 'cobalamin', 'coccygeal', 'cocoon', 'codicil', 'codswallop', 'coiffure', 'coincidence', 'colcannon', 'collision', 'colocate', 'colonel', 'colossal', 'coltan', 'Columbia', 'commendable', 'commodore', 'communique', 'compatriots', 'composure', 'concierge', 'concussion', 'condescendingly', 'condominium', 'condyles', 'Conestoga', 'conflagration', 'Confucianism', 'congealing', 'conjure', 'Connemara', 'connoisseur', 'connubial', 'consanguine', 'consigliere', 'conspicuous', 'conspiracy', 'constabulary', 'constricting', 'contagious', 'contaminated', 'contretemps', 'contumelious', 'conundrum', 'conurbation', 'convictions', 'copious', 'coppice', 'copse', 'coracle', 'cordial', 'cordillera', 'cormorant', 'cornichon', 'coronation', 'corporate', 'corrigenda', 'corsair', 'corybantic', 'coterie', 'Cotswold', 'coulomb', 'coulrophobia', 'countenance', 'courtiers', 'covenant', 'cozen', 'crampon', 'crematoria', 'crepuscular', 'crescive', 'croquignole', 'croustade', 'crustaceans', 'culminate', 'cupolas', 'currycomb', 'cygnet', 'cypress', 'cyrillic', 'dactylic', 'daguerreotype', 'Daliesque', 'damson', 'danseur', 'Dantean', 'darmstadtium', 'darnel', 'Darwinism', 'deathin', 'decrepitude', 'defector', 'degauss', 'deleterious', 'deliquesce', 'demitasse', 'demulcent', 'demurrage', 'dengue', 'denouement', 'denouncement', 'depilatory', 'derecho', 'derelict', 'derogatory', 'derrick', 'Deseret', 'desiccate', 'despondency', 'deuterium', 'Devanagari', 'devout', 'dexterity', 'dhole', 'dhurrie', 'diamante', 'diapason', 'diaphoresis', 'diastole', 'digerati', 'diktat', 'diluent', 'diphtheria', 'Diplodocus', 'dirigible', 'dirndl', 'disciform', 'disconcerting', 'disconsolate', 'discord', 'discreetly', 'discriminating', 'disembodied', 'disembogue', 'disgorged', 'dismayed', 'dispensation', 'disquisition', 'dissuade', 'divan', 'divulge', 'Djibouti', 'dolmen', 'dosages', 'dragee', 'dragoons', 'drudgery', 'ducats', 'dudgeon', 'duello', 'dulcinea', 'Durham', 'duxelles', 'Dvorak', 'dysphasia', 'dysrhythmia', 'ebullience', 'ecchymosis', 'ecclesiology', 'Edinburgh', 'efflux', 'effrontery', 'Einstein', 'elan', 'eleemosynary', 'elegiac', 'elision', 'embellishes', 'embolus', 'embouchure', 'embroidery', 'emollient', 'emolument', 'empennage', 'emperor', 'emphatic', 'encephalitis', 'enchantment', 'enervating', 'engineering', 'engrossed', 'ennui', 'ensilage', 'entomophagy', 'entrepreneurs', 'enumerated', 'epenthesis', 'epithets', 'Eris', 'erythroblast', 'escritoire', 'esplanade', 'etagere', 'ethylene', 'Etruscan', 'eucalyptus', 'euphonious', 'eviction', 'examen', 'exasperation', 'exchequer', 'excruciating', 'execrable', 'exhalation', 'exiguous', 'exile', 'existence', 'exogenous', 'expatiate', 'expatiated', 'exposure', 'exquisite', 'extenuation', 'extravasate', 'facile', 'facilitate', 'facsimile', 'fait', 'fanfaronade', 'farfalle', 'farina', 'farouche', 'farrago', 'featherbrained', 'feckless', 'feinted', 'ferruginous', 'fester', 'fetlocks', 'Ficus', 'filar', 'financiers', 'Firenze', 'fixity', 'flabbergasted', 'flagellum', 'flaneur', 'flavedo', 'fleche', 'flehmen', 'floruit', 'fluorescent', 'focaccia', 'fodder', 'foley', 'formaldehyde', 'fortissimo', 'fortuitous', 'fossiliferous', 'fouette', 'fractious', 'framboise', 'franchise', 'frangipane', 'Freudian', 'Fribourg', 'frigate', 'frisson', 'fronds', 'frontispiece', 'frugivore', 'fulgent', 'functionary', 'furuncle', 'gabbro', 'gagaku', 'Gaia', 'gaillardia', 'galena', 'gallium', 'galoot', 'gambol', 'ganache', 'Ganges', 'gannet', 'gargoyle', 'garrulous', 'gauss', 'gegenschein', 'Geiger', 'gendarme', 'generalissimo', 'genoise', 'gentian', 'genuflect', 'germinate', 'gesellschaft', 'gesticulations', 'girandole', 'Giza', 'glacis', 'gladiatorial', 'Glaswegian', 'glazier', 'gluten', 'glyceraldehyde', 'gnomon', 'goanna', 'golem', 'googol', 'goosander', 'gorgon', 'grandiose', 'graticule', 'griffon', 'grimaces', 'griot', 'grotesque', 'Gruyere', 'guanine', 'guarantor', 'Guarnerius', 'guayabera', 'gudgeon', 'guilloche', 'gules', 'gypsophila', 'habanero', 'habiliments', 'hackamore', 'hagiographer', 'Haitian', 'halcyon', 'hallucinations', 'hallux', 'halogens', 'hamadryad', 'hangul', 'harmattan', 'hauberk', 'haughty', 'hauteur', 'hawsers', 'hebdomadal', 'Hebrides', 'heinousness', 'heirloom', 'heliacal', 'helium', 'hellebore', 'hemorrhage', 'hepatectomy', 'herbalist', 'heredity', 'heresy', 'heritage', 'hermeneutics', 'hermetically', 'hesitate', 'heuristic', 'hilum', 'Himalayan', 'hindmost', 'hirsute', 'Hispaniola', 'histolysis', 'hokum', 'Holocaust', 'hominin', 'Honolulu', 'hooey', 'horologist', 'hortatory', 'hovel', 'Huallaga', 'Huguenot', 'Humboldt', 'hummock', 'humus', 'hurtle', 'hymnal', 'hypallage', 'Hyperion', 'hypertrophy', 'hypotenuse', 'hyssop', 'iatrogenic', 'ibidem', 'Icarian', 'Icarus', 'ichthyology', 'icosahedron', 'ignoble', 'ikat', 'ikebana', 'illative', 'imaret', 'immiscible', 'immoderate', 'immure', 'impeccable', 'impenetrable', 'impertinent', 'implacable', 'impugn', 'inadvertent', 'incarcerated', 'incessant', 'inchoate', 'incomprehensible', 'inconceivable', 'incongruous', 'incorrigibles', 'increments', 'incunabula', 'indicia', 'indifference', 'ineffective', 'inevitable', 'inexorably', 'infectious', 'inglenook', 'inheritance', 'insouciance', 'instinctive', 'insulin', 'insurance', 'intentionally', 'intercede', 'interferon', 'interminableness', 'internecine', 'interpellate', 'interpolated', 'interstices', 'intestine', 'intimation', 'intolerance', 'intoxicating', 'intriguing', 'inveighed', 'irreverent', 'irreversible', 'ivermectin', 'jabot', 'jacana', 'jacaranda', 'Jacobean', 'jacquard', 'Jains', 'jalousie', 'jauntily', 'javelin', 'Jesuit', 'jibboom', 'jicama', 'jodhpurs', 'Judaism', 'judoka', 'julienne', 'Jungian', 'kaddish', 'kaffeeklatsch', 'kakapo', 'kalanchoe', 'kanban', 'kanji', 'Kannada', 'katabatic', 'katakana', 'katsura', 'kente', 'kepi', 'Keplerian', 'Kerala', 'Keynesian', 'Kilimanjaro', 'kinesiology', 'knickerbockers', 'kobold', 'Koine', 'Korea', 'krewe', 'kufi', 'kugel', 'kurta', 'kwashiorkor', 'laburnums', 'labyrinthine', 'lachrymose', 'lacrosse', 'lacustrine', 'lama', 'lapidary', 'largesses', 'larkspur', 'laryngitis', 'Lascaux', 'lassitude', 'latitudinarian', 'latke', 'leach', 'lebensraum', 'lecithin', 'legitimately', 'lemniscus', 'leonine', 'levees', 'liability', 'liana', 'lichenous', 'lidocaine', 'Lilliput', 'lilliputian', 'limaçon', 'lineage', 'linnet', 'linoleum', 'lipophilic', 'Lisztian', 'litany', 'litigious', 'littoral', 'livery', 'Llullaillaco', 'lobscouse', 'longevous', 'loupe', 'luculent', 'Luddite', 'luftmensch', 'lurching', 'Lutheran', 'luthier', 'lyre', 'lysozyme', 'macaque', 'machete', 'Machiavellian', 'mackinaw', 'macropterous', 'Madagascar', 'Magellan', 'mahogany', 'maillot', 'malacca', 'malachite', 'malign', 'mallet', 'Mandarin', 'mandible', 'mandrill', 'mangonel', 'manteau', 'Mantua', 'maquette', 'maquillage', 'Marathi', 'marcel', 'marinate', 'marmalade', 'marquee', 'martinet', 'mascarpone', 'massacres', 'maxillae', 'McIntosh', 'mechanics', 'meditation', 'Mediterranean', 'medulla', 'megrims', 'meiosis', 'melee', 'memorandum', 'mendicity', 'menorahs', 'merengue', 'meringue', 'Merrimack', 'mesial', 'mete', 'Methuselah', 'meuniere', 'mien', 'mignonette', 'milieu', 'millinery', 'Minnesota', 'miracle', 'mitochondria', 'mizuna', 'modiste', 'moiety', 'monomania', 'monsieur', 'Montmorency', 'moppet', 'moraine', 'morbidity', 'morel', 'mortadella', 'mortification', 'motley', 'moulage', 'mountebank', 'moussaka', 'mufti', 'myeloma', 'Mylar', 'mystic', 'mystified', 'mythos', 'nacelle', 'nainsook', 'Naugahyde', 'naumachia', 'nautilus', 'necromancer', 'neem', 'nefarious', 'neophyte', 'Nereid', 'nescience', 'netsuke', 'neutron', 'niagara', 'nictitate', 'nidicolous', 'nihilism', 'nilpotent', 'nitid', 'nonage', 'nonpareil', 'nonviolent', 'noumenon', 'nudibranch', 'nugatory', 'nuisance', 'nunchaku', 'nyctinasty', 'obdurate', 'obeisant', 'obloquy', 'ochlocracy', 'ocotillo', 'Odin', 'oeuvre', 'offspring', 'ogival', 'olecranon', 'oolite', 'oologist', 'opinionated', 'opportunity', 'oppugn', 'oracle', 'orchids', 'oriole', 'ormolu', 'orogeny', 'Orwellian', 'ossicle', 'otiose', 'Ouagadougou', 'oubliette', 'outlandish', 'outre', 'overweening', 'oviparous', 'oxalis', 'oxyacetylene', 'oyez', 'padre', 'pahoehoe', 'paillard', 'paladin', 'palaver', 'palindrome', 'palladium', 'pallid', 'palpable', 'palsy', 'pamphlet', 'panegyric', 'panettone', 'panjandrum', 'papeterie', 'pappardelle', 'parachuted', 'paraffin', 'parallax', 'paralysis', 'paraquat', 'parchment', 'parenthetical', 'parishioner', 'paronomasia', 'paroxysm', 'parquet', 'parterre', 'paschal', 'pasquinade', 'pastiche', 'pastitsio', 'pastrami', 'Patagonia', 'patois', 'patronymic', 'pearlescent', 'pecuniary', 'pekoe', 'pelisse', 'penchant', 'penicillin', 'penurious', 'Pepysian', 'perdition', 'peregrination', 'perilous', 'periodically', 'permanence', 'perorate', 'peroxide', 'perpetrator', 'persiflage', 'pertinacity', 'pestiferous', 'petrifying', 'petulance', 'phenomenal', 'phloem', 'phosphine', 'phrenologists', 'physicists', 'piccata', 'pikas', 'pilgrimages', 'pill', 'pillage', 'pinetum', 'pinioned', 'pinniped', 'pirouetted', 'piscivorous', 'piteously', 'pitons', 'plagiarism', 'planetesimal', 'plangency', 'Plantagenet', 'plastron', 'playwright', 'plenipotentiary', 'plumage', 'pneumatocyst', 'podagra', 'pointelle', 'polemic', 'politesse', 'poltroon', 'polydactyly', 'pomology', 'pompadour', 'pompeii', 'pongee', 'Ponzi', 'porcine', 'porcupine', 'portmanteau', 'potentialities', 'poultice', 'prana', 'precariously', 'predilection', 'premonition', 'prescient', 'presentient', 'presidio', 'prestidigitation', 'prestigious', 'pretentious', 'primavera', 'primordial', 'prioress', 'proclamation', 'proctors', 'prodigious', 'proffered', 'profiterole', 'profligacy', 'profusion', 'prognosticate', 'promulgate', 'propaganda', 'propane', 'propensity', 'proportionate', 'propound', 'proprioceptive', 'proscenium', 'prosthetic', 'protruding', 'proviso', 'proximo', 'pruritus', 'pseudonymous', 'psoriasis', 'psychiatrist', 'pterodactyl', 'ptosis', 'pudibund', 'puerilely', 'pugnacious', 'pulchritude', 'pulmonary', 'pusillanimous', 'putrefaction', 'putsch', 'pylorus', 'Pyrenees', 'Pythagorean', 'Pyxis', 'quandary', 'quantum', 'Quasimodo', 'quatrains', 'quatrefoil', 'quattrocento', 'querulous', 'queue', 'quidnunc', 'quokka', 'radicchio', 'rafflesia', 'raillery', 'ranchero', 'ransacked', 'ranunculus', 'rapprochement', 'Rastafarian', 'rathskeller', 'ravine', 'realgar', 'realia', 'realpolitik', 'recusant', 'redingote', 'redound', 'refectory', 'referral', 'reflexology', 'regnal', 'reluctant', 'rembrandt', 'remonstrance', 'renal', 'rendition', 'renminbi', 'repartee', 'repast', 'reprobate', 'repugnance', 'requisites', 'reseau', 'reservoir', 'resinous', 'resonate', 'retinoscopy', 'revanche', 'reveille', 'Reykjavik', 'rheostat', 'rhetorical', 'rheumatic', 'rhizome', 'rhododendron', 'rhyton', 'ricochet', 'riparian', 'risibility', 'risorgimento', 'rocaille', 'rococo', 'roiling', 'rondeau', 'Rorschach', 'rouille', 'roux', 'rubato', 'rubefacient', 'Rubicon', 'rugose', 'rummages', 'russet', 'Ryukyu', 'sacerdotal', 'sacristy', 'Sagittarius', 'Sahel', 'samarium', 'sanguine', 'satiety', 'saturnine', 'scabbard', 'scallion', 'scintillation', 'scourge', 'scrivener', 'scrumptiously', 'scurrilous', 'scuttlebutt', 'sebaceous', 'secant', 'sedulous', 'seine', 'semaphore', 'semblance', 'Seminole', 'seneschal', 'senile', 'sentries', 'sepulchral', 'sequoia', 'servitude', 'sforzando', 'Sherpa', 'sibilant', 'silhouetted', 'Sinai', 'sinewy', 'Singapore', 'sinuously', 'Sioux', 'smelters', 'sojourner', 'solace', 'solecism', 'solenoid', 'somnolent', 'sophomore', 'sorghum', 'sphinx', 'sporran', 'squadron', 'stalagmite', 'stalemate', 'stanchion', 'stealthily', 'steeplechasing', 'stevedore', 'stevedores', 'stirrups', 'stratagems', 'strenuous', 'strife', 'strychnine', 'substantial', 'subterranean', 'succulent', 'suffused', 'supercilious', 'superintendent', 'surcease', 'surfeit', 'surgeon', 'swankiest', 'sylph', 'syncope', 'synod', 'tamarack', 'tamarisk', 'tanager', 'tapirs', 'tarpaulin', 'taxidermy', 'Teflon', 'Tegucigalpa', 'telamon', 'temblor', 'tempestuous', 'tenaciously', 'tenon', 'testosterone', 'tetanus', 'Teutonic', 'thalamus', 'therapeutic', 'thoroughfare', 'threnody', 'throes', 'tomography', 'toque', 'toreador', 'torpid', 'torturous', 'towhee', 'traitorous', 'transept', 'transgressions', 'translucent', 'treacherous', 'treatise', 'tremendous', 'tremulous', 'tribulations', 'trichinosis', 'trochee', 'trough', 'truculently', 'tryptophan', 'tuatara', 'tumultuous', 'tumulus', 'tussock', 'undulating', 'unprepossessing', 'unscrupulous', 'unsportsmanlike', 'unsullied', 'unwonted', 'upsilon', 'uranium', 'vagabonds', 'Vancouver', 'variegated', 'varsity', 'venerable', 'vengeance', 'verdure', 'verisimilitude', 'vermicelli', 'vestigial', 'vicissitudes', 'vinaigrette', 'vireo', 'vitiate', 'vizierial', 'vociferous', 'voluminous', 'Vulcan', 'wapiti', 'warden', 'wassail', 'whippoorwill', 'wickiup', 'wrath', 'Yeatsian', 'zodiac', 'zydeco'] - -function cyrb128(str) { - let h1 = 1779033703, h2 = 3144134277, - h3 = 1013904242, h4 = 2773480762; - for (let i = 0, k; i < str.length; i++) { - k = str.charCodeAt(i); - h1 = h2 ^ Math.imul(h1 ^ k, 597399067); - h2 = h3 ^ Math.imul(h2 ^ k, 2869860233); - h3 = h4 ^ Math.imul(h3 ^ k, 951274213); - h4 = h1 ^ Math.imul(h4 ^ k, 2716044179); - } - h1 = Math.imul(h3 ^ (h1 >>> 18), 597399067); - h2 = Math.imul(h4 ^ (h2 >>> 22), 2869860233); - h3 = Math.imul(h1 ^ (h3 >>> 17), 951274213); - h4 = Math.imul(h2 ^ (h4 >>> 19), 2716044179); - h1 ^= (h2 ^ h3 ^ h4), h2 ^= h1, h3 ^= h1, h4 ^= h1; - return [h1>>>0, h2>>>0, h3>>>0, h4>>>0]; -} - -function sfc32(a, b, c, d) { - return function() { - a |= 0; b |= 0; c |= 0; d |= 0; - var t = (a + b | 0) + d | 0; - d = d + 1 | 0; - a = b ^ b >>> 9; - b = c + (c << 3) | 0; - c = (c << 21 | c >>> 11); - c = c + t | 0; - return (t >>> 0) / 4294967296; - } -} - -// Create cyrb128 state: -var today = new Date().toLocaleString("en-US", {timeZone: "America/New_York"}); -today = today.split(',')[0]; -console.log(`Reference Date: ${today}`) -var seed = cyrb128(today); - -// Four 32-bit component hashes provide the seed for sfc32. -var rand = sfc32(seed[0], seed[1], seed[2], seed[3]); - -function chooseWords(wordLst){ - result = []; - while (result.length < 5) { - var item = wordLst[Math.floor(rand()*wordLst.length)]; - if (!result.includes(item)){ - result.push(item) - } - } - return result; -} - -function shuffle(array) { - let currentIndex = array.length, randomIndex; - - // While there remain elements to shuffle. - while (currentIndex > 0) { - - // Pick a remaining element. - randomIndex = Math.floor(Math.random() * currentIndex); - currentIndex--; - - // And swap it with the current element. - [array[currentIndex], array[randomIndex]] = [ - array[randomIndex], array[currentIndex]]; - } - - return array; -} - -function genYoutubeWordLst(){ - result = []; - var YTseed = cyrb128("content"); - // Four 32-bit component hashes provide the seed for sfc32. - var YTrand = sfc32(YTseed[0], YTseed[1], YTseed[2], YTseed[3]); - - - wordLst = easyWords - - while (result.length < 10) { - var item = wordLst[Math.floor(YTrand()*wordLst.length)]; - if (!result.includes(item)){ - result.push(item) - } - } - - wordLst = mediumWords - while ((result.length) < 20 && (result.length >= 10)) { - var item = wordLst[Math.floor(YTrand()*wordLst.length)]; - if (!result.includes(item)){ - result.push(item) - } - } - wordLst = hardWords - while ((result.length) < 100 && (result.length >= 20)) { - var item = wordLst[Math.floor(YTrand()*wordLst.length)]; - if (!result.includes(item)){ - result.push(item) - } - } - - return result; -} -console.log(genYoutubeWordLst(mediumWords)) -/* -var easyWordSelection = chooseWords(easyWords) -var mediumWordSelection = chooseWords(mediumWords) -var hardWordSelection = chooseWords(hardWords) -*/ diff --git a/assets/scripts/youtube.js b/assets/scripts/youtube.js index 799f89a5..94cb8e95 100644 --- a/assets/scripts/youtube.js +++ b/assets/scripts/youtube.js @@ -69,6 +69,7 @@ function checkLevel(level){ } function updateWord(){ + resetPlayer(playerLst); if (wordCounter < 10){ levelPath = "levelOne" } else if ((wordCounter >= 10) && (wordCounter<20)){ @@ -78,10 +79,8 @@ function updateWord(){ } wordLst = genYoutubeWordLst() path = `assets/audio/${levelPath}`; - resetPlayer(playerLst); activeWord = wordLst[wordCounter]; wordOnePlayer.src = `${path}/${wordLst[wordCounter]}.mp3` - //console.log(`levelPath: ${levelPath}\nWord Counter: ${wordCounter}.\nActive Word: ${activeWord}`) publicCount.textContent = `Words Spelled: ${wordCounter}` } @@ -89,7 +88,7 @@ function updateWord(){ function endGame(){ sessionStorage.setItem("submissionLst", submissionLst) sessionStorage.setItem("correctSpellingLst",correctSpellingLst) - sessionStorage.setItem("level", level) + sessionStorage.setItem("level", "YouTube Challenge") window.location.replace("practice_results.html"); } @@ -118,6 +117,7 @@ function deleteLetter () { } function guessPreprocess() { + if ((lastActiveWord != null) & (activeWord==null)) { activeWord = lastActiveWord; checkGuess() @@ -141,16 +141,12 @@ function checkGuess() { if (attemptStr.toLowerCase() == activeWord.toLowerCase()) { submissionLst.push(`${attemptStr}`) wordCounter += 1; - stopSound(activePlayer[1]); - updatePlayer(playerLst, activePlayer) - // DEACTIVATE WORD - activeWord = null; + // activeWord = null; activePlayer = null; - // RECURSIVE CALL FOR NEW WORD updateWord(); } else { @@ -165,35 +161,37 @@ function checkGuess() { // update players to reflect their current status function updatePlayer(playerLst, activePlayer) { + if (activePlayer[0].classList.contains("clicked")) { stopSound(activePlayer[1]); - activePlayer[0].classList.remove("clicked","fa-pause-circle"); + activePlayer[0].classList.remove("clicked","fa-circle-stop"); activePlayer[0].classList.add("fa-play-circle"); - + lastActiveWord = activeWord; // DEACTIVATE WORD - activeWord = null; + // activeWord = null; activePlayer = null; return; } playerLst.forEach((player) => { - if ((!player[0].classList.contains("submitted")) & player[0] != activePlayer[0]) { - player[0].classList.remove("clicked", "fa-pause-circle"); + if (player[0] != activePlayer[0]) { + player[0].classList.remove("clicked", "fa-circle-stop"); stopSound(player[1]); - } else if ((!player[0].classList.contains("submitted")) & player[0] == activePlayer[0]) { - activePlayer[0].classList.add("clicked","fa-pause-circle"); + } else if (player[0] == activePlayer[0]) { + activePlayer[0].classList.add("clicked","fa-circle-stop"); activePlayer[1].play(); } }) - return; + + } function resetPlayer(playerLst) { playerLst.forEach((player) => { player[0].style.backgroundColor = null; - player[0].classList.remove("clicked", "fa-xmark","fa-check", "submitted") + player[0].classList.remove("clicked", "fa-xmark","fa-check", "fa-circle-stop", "submitted") player[0].classList.add("fa-play-circle") }) } diff --git a/assets/scripts/youtube2.js b/assets/scripts/youtube2.js deleted file mode 100644 index 332dfe5c..00000000 --- a/assets/scripts/youtube2.js +++ /dev/null @@ -1,287 +0,0 @@ -/* https://www.freecodecamp.org/news/build-a-wordle-clone-in-javascript/ */ -const KEYBOARD_EL = document.querySelector("#keyboard") -const attempt = document.querySelector("#attempt-box") -var level = sessionStorage.getItem("level"); -var publicCount = document.querySelector('#count') - -var wordOne = document.querySelector("#word-one") -var wordOnePlayer = document.querySelector("#word-one-player") - -var lastActiveWord = null; - -var wordCounter = 0; -var attemptStr = ''; -var activeWord = null; -var activePlayer = null; -var wordLst; -var levelPath; - -var results = ''; -var submissionLst = []; -var correctSpellingLst = []; -var wrongSubmission = ''; -var playerLst = [[wordOne, wordOnePlayer]]; - -KEYBOARD_EL.innerHTML = `
-
- - - - - - - - - - -
-
- - - - - - - - - -
-
- - - - - - - - -
-
- -
-
` - -// CHECK LEVEL -function checkLevel(level){ - resetPlayer(playerLst); - attempt.value=attemptStr; - updateWord(); -} - -function updateWord(){ - if (wordCounter < 10){ - levelPath = "levelOne" - } else if ((wordCounter >= 10) && (wordCounter<20)){ - levelPath = "levelTwo" - }else if ((wordCounter >= 20) && (wordCounter<100)){ - levelPath = "levelThree" - } - wordLst = genYoutubeWordLst() - path = `assets/audio/${levelPath}`; - resetPlayer(playerLst); - activeWord = wordLst[wordCounter]; - wordOnePlayer.src = `${path}/${wordLst[wordCounter]}.mp3` - //console.log(`levelPath: ${levelPath}\nWord Counter: ${wordCounter}.\nActive Word: ${activeWord}`) - - publicCount.textContent = `Words Spelled: ${wordCounter}` -} - -function endGame(){ - sessionStorage.setItem("submissionLst", submissionLst) - sessionStorage.setItem("correctSpellingLst",correctSpellingLst) - sessionStorage.setItem("level", "YouTube Challenge") - - window.location.replace("practice_results.html"); -} - -// STOP PLAYING SOUND -function stopSound(soundObj) { - soundObj.pause(); - soundObj.currentTime = 0; -} - -// UPDATE ATTEMPT STR UPON KEYPRESS -function insertLetter(pressedKey) { - pressedKey = pressedKey.toUpperCase() - attemptStr = attemptStr + pressedKey; - attempt.focus(); - attempt.value = attemptStr; - attempt.scrollLeft = attempt.scrollWidth; -} - -// DELETE A LETER -function deleteLetter () { - if (attemptStr.length > 0) { - attemptStr = attemptStr.slice(0,-1); - } - attempt.value = attemptStr; -} - -function guessPreprocess() { - console.log(`lastActiveWord: ${lastActiveWord}`) - console.log(`activeWordd: ${activeWord}`) - - if ((lastActiveWord != null) & (activeWord==null)) { - activeWord = lastActiveWord; - checkGuess() - return; - } else if (activeWord == null) { - console.log("Attempted guess without word selected."); - attemptStr = ''; - attempt.value = attemptStr; - return; - } else if (attemptStr == '') { - console.log("Empty string submitted as guess. Ignoring that."); - return; - } else { - checkGuess(); - } -} - -// CHECK IF GUESS IS CORRECT -function checkGuess() { - correctSpellingLst.push(`${activeWord}`) - if (attemptStr.toLowerCase() == activeWord.toLowerCase()) { - submissionLst.push(`${attemptStr}`) - wordCounter += 1; - stopSound(activePlayer[1]); - - // DEACTIVATE WORD - // activeWord = null; - activePlayer = null; - - // RECURSIVE CALL FOR NEW WORD - updateWord(); - } else { - submissionLst.push(`${attemptStr}`) - endGame(); - } - - attemptStr = ''; - attempt.value = attemptStr; - return -} -// update players to reflect their current status -function updatePlayer(playerLst, activePlayer) { - console.log("Running updatePlayer()") - - if (activePlayer[0].classList.contains("clicked")) { - stopSound(activePlayer[1]); - activePlayer[0].classList.remove("clicked","fa-pause-circle"); - activePlayer[0].classList.add("fa-play-circle"); - - lastActiveWord = activeWord; - console.log(`assigning lastActiveWord: ${lastActiveWord}`) - - // DEACTIVATE WORD - // activeWord = null; - activePlayer = null; - return; - } - - playerLst.forEach((player) => { - if (player[0] != activePlayer[0]) { - player[0].classList.remove("clicked", "fa-pause-circle"); - stopSound(player[1]); - } else if (player[0] == activePlayer[0]) { - activePlayer[0].classList.add("clicked","fa-pause-circle"); - activePlayer[1].play(); - } else { - console.log("updatePlayer loophole triggered.") - } - }) - - -} - -function resetPlayer(playerLst) { - playerLst.forEach((player) => { - player[0].style.backgroundColor = null; - player[0].classList.remove("clicked", "fa-xmark","fa-check", "submitted") - player[0].classList.add("fa-play-circle") - }) -} - -// PROMPT MANAGEMENT - -wordOne.addEventListener("click", (e) => { - activePlayer = [wordOne, wordOnePlayer]; - updatePlayer(playerLst, activePlayer) -}) - - -// LINK ONSCREEN KEYBOARD FUNCTIONALITY TO KEYPRESSS -document.getElementById("keyboard-cont").addEventListener("click", (e) => { - const target = e.target - - if (!target.classList.contains("keyboard-button")) { - return - } - - let key = target.textContent - - if (target.classList.contains("fa-delete-left")){ - deleteLetter(); - return - //key = "Backspace" - } - - if (key==="submit"){ - guessPreprocess(); - return - //key = "Enter" - } - - let pressedKey = target.innerText; - let found = pressedKey.match(/[a-z]/gi) - - if (!found || found.length > 1) { - return - } else { - insertLetter(pressedKey) - document.querySelector(`#${pressedKey.toLowerCase()}`).classList.add("clicked") - setTimeout(() => { - setTimeout(document.querySelector(`#${pressedKey.toLowerCase()}`).classList.remove("clicked")); - }, 50); - return; - } - //document.dispatchEvent(new KeyboardEvent("keyup", {'key': key})) -}) - -// KEYPRESS TYPING LISTENER -document.addEventListener("keyup", (e) => { - - let pressedKey = String(e.key) - let found = pressedKey.match(/[a-z]/gi) - - if (pressedKey === "Enter") { - document.querySelector(`#${pressedKey}`).classList.add("clicked") - setTimeout(() => { - setTimeout(document.querySelector(`#${pressedKey}`).classList.remove("clicked")); - }, 50); - guessPreprocess() - return; - } - - if (pressedKey === "Backspace" & attemptStr.length != 0) { - document.querySelector(`#${pressedKey}`).classList.add("clicked") - setTimeout(() => { - setTimeout(document.querySelector(`#${pressedKey}`).classList.remove("clicked")); - }, 50); - deleteLetter() - return; - } - - if (!found || found.length > 1) { - return - } else { - insertLetter(pressedKey) - document.querySelector(`#${pressedKey.toLowerCase()}`).classList.add("clicked") - setTimeout(() => { - setTimeout(document.querySelector(`#${pressedKey.toLowerCase()}`).classList.remove("clicked")); - }, 50); - return; - } -}) - -checkLevel("youtube") \ No newline at end of file diff --git a/youtube.html b/youtube.html index 380355c2..7b193c5d 100644 --- a/youtube.html +++ b/youtube.html @@ -42,6 +42,6 @@

Speling Bee

- - + + \ No newline at end of file