Inspiration
We were inspired to create this game because I love playing the classic game, Hangman. In my program, the user must enter a text file that they have, so they can customize the words to their liking.
What it does
The project is a traditional hangman game in which the user must choose a letter that could belong to the word. If the user is correct, then the letters and their positioning will be revealed. Otherwise, the user will be penalized. If you get more than 6 incorrect guesses, then you lose.
How we built it
The project was built with java and IntelliJ Idea. For the project, we used a scanner object to receive user input as to what the name of the file that contains the words will be. Next, after accessing the file and extracting each word into an array, we used a series of if/else statements as well as String Builder to construct the game.
Challenges we ran into
One of the biggest challenge was a matter of debugging - there was a bracket that was in the incorrect space (thus throwing off one part of the project from working correctly). Another challenge that was unfortunately left unsolved was the matter of having a variable that would count the number of current wins (streak) the user has.
Accomplishments that we're proud of
We are proud of creating a world-loved game that I can enjoy in our free time.
What we learned
We learned how to better use String Builder and divide text files by spaces using the split function.
What's next for Hangman.java
We would like to create a user interface as well as work on the aspect of the project that we were unable to fix, which was the current number of wins variable that would track the user's streak.
Log in or sign up for Devpost to join the conversation.