This is a simple classical CLI-based Hangman game written in Golang, which will ask users to guess a word, and for every wrong guess, the attempts will be reduced. You don't have to be a developer to run this game, all you need to do is follow the simple steps, then you're all set to play!
-Users can choose to play the game on different levels: Easy, Medium, and Hard.
-The Easy level will give 10 attempts to the user to guess the word. The Medium level will give 6 attempts, and the Hard level will only give 4 attempts to guess the word.
-On every wrong guess, the wrong letter will be displayed, which will help the user not to repeat the same letter.
-For every wrong attempt, the formation of hangman starts, and as soon as all the attempts are over, a full hangman will be formed, and the game will be finished.
-Finally, the summary of the user's gameplay (games played , wins , losses) will be displayed .
Follow these steps to download and play the game directly.
Click the here to go to the official downloads page for this game : https://github.com/chethanm99/hangman-cli-game/releases/tag/v1.0.0
On the releases page, look for the "Assets" section. You need to download two files:
-
The Game Executable:
- If you are on Windows, download
hangman.exe. - If you are on macOS, download
hangman-macos. - If you are on Linux, download
hangman-linux.
- If you are on Windows, download
-
The Word List:
- You must also download the
words.txtfile.
- You must also download the
Create a new folder on your computer (e.g., on your Desktop) and place both the game executable and the words.txt file inside it.
-
On Windows: Simply double-click the
hangman.exefile. -
On macOS or Linux: You need to give the file permission to run first.
- Open your Terminal application.
- Navigate to the folder where you saved the files (e.g.,
cd Desktop/MyHangmanGame). - Run the command:
chmod +x ./hangman-macos(or./hangman-linux). - Now, run the game with:
./hangman-macos(or./hangman-linux).
If you have Go installed and want to build the project yourself:
-
Clone the Repository
git clone https://github.com/chethanm99/your-repo-name.git cd your-repo-name -
Create the Word File Make sure you have a
words.txtfile in the root directory with one word per line. -
Run the Game
go run .