A Java-based Hangman game with a graphical user interface implemented using Swing.
Hangman Game is a classic word-guessing game where players try to guess a hidden word by suggesting letters. The game features a visually appealing interface, custom fonts, and utility methods provided by the CustomTools
class for handling images, fonts, and word hiding.
- Image Handling: The game uses the
CustomTools
class to load and update images for visual elements. - Font Customization: Custom fonts are applied to enhance the visual experience.
- Word Database: The
WordDB
class manages a collection of words categorized by different themes.
The WordDB
class is responsible for loading word challenges from a data file. It provides functionality to randomly select a category and a word from that category for each game round.
The data file (resources/data.txt
) used by WordDB
follows a CSV format, where each line represents a category followed by a list of words. For example:
Animals,elephant,lion,tiger
Countries,canada,india,usa
Animes,OnePeach,Naruto
To play the Hangman Game:
- Launch the game by running the App class.
- A new game will start with a random word challenge.
- Click on letter buttons to guess the word.
- Guess the word before running out of attempts.
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or create a pull request.