Skip to content

A simple hangman (word guessing) game with a console UI

Notifications You must be signed in to change notification settings

krios2146/hangman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hangman game

hangman

https://en.wikipedia.org/wiki/Hangman_(game)

Features

  • Six mistakes are allowed
  • Restart and exit by pressing 1 and 0, respectively
  • Dictionary of 1500+ English words, obtained from this site using my own python parser
  • I tried to make the user interface as friendly and intuitive as possible (a little bit of kaomoji)

Run Locally

Clone the project

  git clone https://github.com/krios2146/hangman.git

Go to the project directory

  cd hangamn

Make sure you have installed Rust & Cargo - https://www.rust-lang.org/tools/install

  rustc --version
  cargo --version

Compile and run the program with Cargo

  cargo run

Lessons Learned

It's my first Rust project, and I've never used it before. I wrote it immediately after reading the second chapter of The Rust Programming Language Book. I don't really get the "borrow" system, and the error handling is a little bit strange for me, but I enjoyed writing this project in Rust.

Roadmap

  • Infinite game mode
  • Colorful output for mistake and success guesses
  • Difficulty levels based on word length