Skip to content

JonesAccount/hangman-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

37 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hangman CLI

Demo

A classic Hangman game running in the terminal, written in C.

Features

  • Random word selection from a pool of 64 words
  • Full ASCII hangman animation with 12 stages
  • QWERTY keyboard layout for letter selection
  • Win/loss detection with round reset
  • Menu system to start a new game or quit

How to play

  1. A random word is chosen β€” dashes show the number of letters
  2. Navigate the keyboard with arrow keys, select a letter
  3. Press Space to confirm your choice
  4. Guess the word before you run out of attempts

Build & Run

cd src
gcc *.c -o hangman && ./hangman

Project Structure

src/
β”œβ”€β”€ main.c
β”œβ”€β”€ render_game.c / .h
β”œβ”€β”€ render_menu.c / .h
β”œβ”€β”€ handle_game_input.c / .h
β”œβ”€β”€ handle_menu_input.c / .h
β”œβ”€β”€ check_win_loss.c / .h
β”œβ”€β”€ check_lifes.c / .h
β”œβ”€β”€ match_check.c / .h
β”œβ”€β”€ utils.c / .h
└── defs.h

About

🧩 Classic Hangman game in the terminal, written in C.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages