The Hangman Solver is a Java-based application designed to assist users in solving Hangman games. By narrowing down the possible words from a dictionary based on user inputs, the solver intelligently suggests the most probable letter to guess next. It's a fun tool to enhance your Hangman game experience, offering a strategic edge in guessing words correctly.
- Intelligent Letter Guessing: Suggests the most probable letter to guess next based on the current state of the game.
- Dynamic Dictionary Filtering: Narrows down possible words from the dictionary as the game progresses.
- Game Progress Display: Shows the current guessed word, past guesses, and possible word list as the game unfolds.
- Prerequisites: Ensure you have Java installed on your machine.
- Clone the Repository:
git clone https://github.com/tianhg28/hangman-solver cd hangman-solver/src
- Run the Application:
javac HangmanMain.java java HangmanMain
- Follow the on-screen prompts to input the number of letters in the word and respond to the solver's guesses.
- Start the game, and the solver will ask for the number of letters in the word.
- The solver suggests the best letter to guess. Input 'y' (yes) or 'n' (no) based on whether the guess was correct.
- If correct, provide the position(s) of the letter in the word.
- Continue until the solver guesses the word or the word is revealed.
- HangmanMain: The main class that runs the game, interacts with the user, and integrates the solver.
- HangmanSolver: The core class that contains the logic for suggesting letters and filtering the dictionary based on guesses.
Contributions to improve the Hangman Solver are welcome. Feel free to fork the repository and submit pull requests.
This project is licensed under the MIT license. Please see the LICENSE.md file for more details.