Welcome to the "Guess the Cocktail Game"! This is a console-based game where you try to guess the name of a cocktail based on its instructions. With each incorrect guess, you'll receive additional hints to help you figure out the correct answer.
- Fetches random cocktail recipes from TheCocktailDB API.
- Provides hints such as ingredients, category, glass type, and whether the cocktail is alcoholic.
- Allows setting the game difficulty, which determines the number of letters revealed after each incorrect guess.
- Keeps track of the high score locally.
- Java: The primary programming language used to build the game.
- Spring Boot: For building the backend logic and handling API interactions.
- Maven: For managing dependencies and building the project.
- TheCocktailDB API: Used to fetch random cocktail recipes.
- JUnit & Mockito: For unit testing the game logic.
- Start the Game: The game begins with a welcome message and rules displayed on the console.
- Select Difficulty: Choose your desired difficulty level:
- Easy: 3 letters are revealed with each incorrect guess.
- Normal: 2 letters are revealed.
- Hard: Only 1 letter is revealed.
- Guess the Cocktail: Based on the instructions provided, try to guess the cocktail's name.
- Hints: With each incorrect guess, additional hints such as the type of glass, ingredients, and whether the drink is alcoholic will be revealed.
- Scoring: Earn points based on the number of attempts left when you guess correctly. The game tracks the high score, so try to beat your best!
- Java 21 or later
- Maven
- Clone the repository to your local machine:
git clone https://github.com/your-username/guess-the-cocktail-game.git
- Navigate to the project directory:
cd guess-the-cocktail-game
- Build the project using Maven:
mvn clean install
- Run the game:
mvn spring-boot:run
After running the game, follow the on-screen instructions to play. You'll start by selecting a difficulty level, and then the game will begin giving you hints for guessing the cocktail name. Try to guess correctly in as few attempts as possible to maximize your score!
Enjoy the game, and good luck guessing the cocktails!