This project is a modern implementation of the classic Hangman game, built with React and Next.js. It features a sleek user interface, real-time feedback, and an integrated dictionary feature that provides definitions for the words used in the game.
- Classic Hangman gameplay
- Responsive design using Tailwind CSS
- Real-time feedback on guessed letters
- Visual representation of remaining lives
- Integrated dictionary feature
- Draggable dictionary component for better user experience
- The game starts with a hidden word represented by underscores.
- Guess a letter by typing it into the input field and clicking "Check" or pressing Enter.
- If the letter is in the word, it will be revealed in its correct position(s).
- If the letter is not in the word, you lose a life (represented by hearts).
- Keep guessing letters until you either guess the entire word or run out of lives.
- You can start a new game at any time by clicking the "Restart game" button.
- When a game ends (win or lose), a draggable dictionary component will appear with the definition of the word.
- The dictionary will remain visible until you choose to close it by clicking the X button.
- You can drag the dictionary around the screen for better visibility.
- Starting a new game will not affect the dictionary's visibility.
- React
- Next.js
- TypeScript
- Tailwind CSS
- shadcn/ui components
- react-draggable
This project uses the Free Dictionary API to fetch word definitions.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.