Skip to content

DustyDogCodex/hangman

Repository files navigation

😵 Hangman 😵

Hangman is a classic word guessing game where players try to guess a hidden word by suggesting letters within a certain number of attempts. This Hangman game is built using TypeScript, React, and Tailwind CSS, making it a fun and interactive way to play the game online.

LIVE DEMO

Table of Contents

Features

  • Interactive user interface with React components.
  • Real-time feedback on guessed letters and remaining attempts.
  • A variety of words to guess from a predefined list.
  • Stylish and responsive design using Tailwind CSS.
  • Users can guess letters by pressing keys on their keyboard or by clicking letters on screen.

Installation

Make sure you have Node.js and npm installed on your system.

  1. Clone this repository: git clone https://github.com/DustyDogCodex/hangman.git
  2. Navigate to the project directory: cd hangman
  3. Install dependencies: npm install
  4. Start the development server: npm run dev

Since this project was made with Vite, you can find your dev server on http://localhost:5173/

How to Play

  1. Open the game in your web browser.
  2. Click the letters on the screen or use your keyboard to make your guesses.
  3. You have 6 attempts to guess the word correctly.
  4. Keep guessing letters until you either guess the word or run out of attempts.
  5. If you win, you'll see a victory message; if you lose, you'll see a game over message.
  6. Start a new game by refreshing your window or by clicking restart button after you win/lose a round.

Customization

You can customize this Hangman game by modifying the word list in ListOfWords.ts, increasing or decreasing the number of allowed attempts, or changing the design using Tailwind CSS. Check the source code and configuration files for more details on how to do this.

Acknowledgments

  • This Hangman game was created with ❤️ by Varun Malaviya.
  • Special thanks to the creators of TypeScript, React, and Tailwind CSS for their amazing tools.