A word guessing game built with React and Vite.
The goal is to guess the hidden word before too many incorrect guesses eliminate all languages except Assembly.
- You guess one letter at a time from an on-screen keyboard.
- Correct guesses reveal matching letters in the hidden word.
- Wrong guesses eliminate a programming language chip.
- You win by revealing every letter in the word.
- You lose after 8 incorrect guesses.
- Random word selection each game.
- Color-coded language chips that visually track progress.
- Conditional keyboard styling for correct and wrong guesses.
- Dynamic game status messages (win, lose, farewell).
- Confetti celebration on win.
- Accessible live region updates for screen readers.
- React
- Vite
- clsx (conditional class names)
- react-confetti (win effect)
- ESLint
- Node.js 18+
- npm
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open the local URL shown in the terminal (usually http://localhost:5173).
- npm run dev: start development server
- npm run build: create production build
- npm run preview: preview production build locally
- npm run lint: run ESLint checks
src/
- App.jsx: main game component and game logic
- index.jsx: React entry point
- index.css: game styles
- languages.js: language chip data
- words.js: list of possible words
- utils.js: random word and farewell text helpers
- Wrong guess count is derived from guessed letters that are not in the current word.
- Game ends when:
- all letters are guessed (win), or
- wrong guesses reach the max allowed attempts (loss).
- Starting a new game resets guessed letters and picks a new random word.
- Track win/loss stats in local storage.
- Add difficulty levels (different word lengths).
- Add keyboard input support.
- Add unit tests for helper functions and game state transitions.