Twenty-four words, sixty seconds — how fast can you go?
← Back to Fun TimeRace on the everyday words, or practise a Classical Roots lesson. Pick one book, then tick as many lessons as you like.
This game is split into small library files inside funtime/lib/, and every function has a comment saying exactly what goes in, what comes out, and the algorithm in plain English. Empty any function out, read its comment, and write it yourself.
| File | What it does | Good functions to try re-writing |
|---|---|---|
| lib/typing-rules.js | The rules: matching letters and working out the speed | matchingLetters, submitWord, accuracy, wordsPerMinute |
| lib/typing-draw.js | Painting the words, the typing and the clock | layoutWords, drawTyped, renderGame |
| lib/typing-main.js | The glue: the keyboard and the on-screen one | doAction, connectKeyboard, gameLoop |
💡 The big idea: check before you divide. Accuracy divides by the words attempted, and speed divides by the seconds gone by — and at the very start of a race both of those are zero. Two lines of guard turn a crash into a sensible answer.
🛠️ Want to be walked through it? Build Typing Race Yourself takes you through the key functions one step at a time and tests each one you write. There is a Python version too.