Skip to content

Mallik369/Java-Objects-Hangman-Game-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java-Objects-Skills-Project-Hangman

Hangman Game

Hangman Game is Console based Application developed to play a Hangman Game between User and Computer. This Project is done as a process to develop Java Console Based Application and Learn, Apply and Acquire Java Object Skill Sets.

To Run the Hangman Application

Command Line

                  javac Hangman.java
                  
                  java Hangman amazing

amazing is the word to be guessed by user , it is passed as the argument to Application.

IDE

     The Argument Passed to Application can be set in "Edit Configuration" Panel

Hangman Computer Application is Developed based on Idea of Traditional Hangman Game

The Following User Stories are considered to Develop Hangman Game

1. As a guesser, I should be able to submit a guess, so that I can play the game."

Hangman need to Receive Input from User

                            Method  : public void guessForPrompter( )

2. As a guesser, I should be presented with my current progress, so that I can make an educated guess.

Hangman Computes and Display Current Progress of Game on Console to UserThis is Intermediate Output generated to User and Determine the Solved State of Game.

                          Method  :  public String currentProgress( )   // Compute Current Progress

                          Method  :	 public void displayProgress( )  // Display Current Progress

3. As a guesser, I should know how many remaining tries I have left, so I am encouraged to be cautious.

Hangman Computes and Display Remaining Tries Left

                        Method  :	 public int remainingTries ( )    // Computes remaining Tries

                        Method  :	 public void displayProgress ( )  // Display Current Progress

4. As a guesser, I should be stopped from making a guess that has already been made, so that I do not waste turns.

Hangman needs to Validate User Guess

                        Method   :	private char validateGuess(char letter)

5. As a guesser, I should be able to known when the game is solved or failed, so that I can acknowledge completion with celebration or tears.

Hangman needs to display Final Condition of Game

                     Method:  

                         public void play ( )         //  Runs the Game and Display Success or Failed Message

                         public String getAnswer( )   // Gets the Answer

                         public int remainingTries( )  // Computes the Remaining Tries

                         public boolean isSolved( )    // Computes progress of Hangman Game 

6.Error Checking

Bug: if the empty String is given

Hangman needs Check for Empty String Input from User

                      Method

                      public void applyGuess(String letters)

About

Intial Commit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages