Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/clementmadiot/hangman-typescript

This project is a hangman game in React, Typescript
https://github.com/clementmadiot/hangman-typescript

Last synced: 12 days ago
JSON representation

This project is a hangman game in React, Typescript

Awesome Lists containing this project

README

        


Hangman-typeScript

vite
typescript
tailwindcss

Hangman-typeScript


##
πŸ“‹ Summary

- ✨ [Introduction](#introduction)
- πŸ›  [Technology Used](#tech-stack)
- πŸ“ [Features](#features)
- πŸš€ [Launch App](#launch-app)
- 🎨 [Styling](#style)

##
✨ Introduction

**[ENG]** This project is a classic Hangman game built using TypeScript, Tailwind CSS, and Vite. It offers a fun and interactive experience where players guess letters to reveal a hidden word.

**[FR]** Ce projet est un jeu de Pendu classique construit Γ  l'aide de TypeScript, Tailwind CSS et Vite. Il offre une expΓ©rience amusante et interactive oΓΉ les joueurs devinent des lettres pour rΓ©vΓ©ler un mot cachΓ©.

##
πŸ›  Technology Used

- [TailwindCSS](https://tailwindcss.com/docs/installation)
Tailwind CSS is a valuable tool for developers who want to build modern, responsive, and visually appealing websites without sacrificing development speed.

## πŸ“ Features

πŸ‘‰ **Word Generation** : Generates a random word from a predefined list.

πŸ‘‰ **Word Display**: Displays the word as a series of underscores, revealing guessed letters.

πŸ‘‰ **Keyboard Input:** :

- **Keyboard** : Players can use their physical keyboard to input guesses.

- **On-screen Keyboard**: Players can click on virtual keyboard buttons to input guesses.

πŸ‘‰ **Letter Disabling**: Once a letter is guessed, it is disabled to prevent repeated guesses.

πŸ‘‰ **Win/Lose Conditions** :

- **Win** : The player wins by guessing all letters correctly. Correct guesses are displayed in blue.

- **Lose** : The player loses if they exhaust all incorrect guesses. Incorrect guesses are displayed in red.

##
πŸš€ Launch App

Follow these steps to set up the project locally on your machine.

**Prerequisites**

> [!NOTE]
> Make sure you have the following installed on your machine:

- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/en)
- [npm](https://www.npmjs.com/) _(Node Package Manager)_

**Cloning the Repository**

```bash
git clone {git remote URL}
cd {git project..}
```

**Installation**

> After cloning the repository, run the command `npm i` or `yarn i` to install the project's dependencies.

_npm_

```
npm install
```

_yarn_

```
yarn install
```

> Once the dependencies are installed, start the project with the command `npm run dev`.

#
🎨 Styling

Global styling are defined using **CSS** & **TailwindCSS**

index.css

```css
@tailwind base;
@tailwind components;
@tailwind utilities;

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
width: 100dvw;
overflow-x: hidden;
height: 100%;
background: linear-gradient(to top, #dfe9f3 0%, white 100%);
}
```

tailwind.config.js

````cjs
theme: {
extend: {
colors: {
blackLight: "#303841",
},
gridTemplateColumns:{
'auto-fit-75': 'repeat (auto-fill, minmax(75px, 1fr)'
}
},
},
````