A game where a user can play hangman against a computer, using words randomly selected from a text file.
You will need the following to pull, build and run the game:
The game is run using a terminal.
Simply download the script using a terminal:
curl -OL https://raw.githubusercontent.com/jagwirecode/HangmanJava/master/HangmanJava.sh
Then run it with the following commands
chmod +x HangmanJava.sh
./HangmanJava.sh
WARNING: THIS WILL DELETE FOLDERS CALLED HangmanJava IF PRESENT IN THE SAME DIRECTORY
First, clone the repository
git clone https://github.com/jagwirecode/HangmanJava.git
Then go to the directory:
cd HangmanJava
Compile the java files
javac -d out src/com/jagwirecode/hangmanjava/*.java
And finally, run the game with
java -cp out com.jagwirecode.hangmanjava.Main
When running the game, you will be prompted whether you wish to enter your own word. Simply type "y" for yes or "n" for no and press enter.
If yes, you may type any number of words (separated by single spaces) and press enter.
If no, the game will randomly select from a list of words supplied by the text file found in the res folder. By default, these words are movie names, however this can be changed by the user by modifying the words in the file(as long as each new phrase is on a new line).
You can now begin typing letters. You have 8 turns to beat the game, good luck and have fun!
You can find the documentation at https://jagwirecode.github.io/HangmanJava/com/jagwirecode/hangmanjava/package-summary.html