A lightweight, terminal-based Hangman game written in Java. This project was built as a prototype and beginner exercise to practice core Object-Oriented Programming (OOP) concepts, file I/O operations, and basic game logic.
- Multiple Categories: Choose from three word categories (Cars, Phones, or Video Game Characters).
- Randomized Word Selection: Each category dynamically selects a target word per session.
- External Dictionary Validation: Integrates a local text file (
words.txt) to check and validate user guesses. - Trial Tracking: Real-time feedback on remaining attempts and current word progress.
Main: Handles initial user input and navigates to the selected game category.GameDictionary: Readswords.txtinto aHashSetto validate player input.Cars,Phones,Characters: Category classes containing game submenus and word-guessing loops.
- Prerequisites: Ensure Java Development Kit (JDK) 21 or higher is installed on your system.
- Dictionary File: Ensure the
words.txtfile is located in the root directory where the program runs. - Compilation:
javac Main.java