Click to play the game here
(Note: There may be a short wait time when accessing the game, as it is hosted on Render.com, which may put the app to sleep during periods of inactivity.)
The Mastermind game webapp is a fun and engaging implementation of the classic game of Mastermind. It's built with Java and Spring Boot for the backend, MySQL for the database, and the frontend is designed with Thymeleaf, Bootstrap, and JavaScript. Players can compete against the computer, selecting different game modes and difficulty levels. Users have the option to create an account to track their scores and progress. The app also features a user profile page and a leaderboard that ranks the top 10 players by score. The game is designed to be responsive and mobile-friendly.
- Java
- Spring Boot
- Spring Security
- MySQL
- Docker
- Thymeleaf
- Bootstrap
- HTML
- CSS
- JavaScript
- User authentication with Spring Security, MySQL, and OAuth2.
- Google account sign-in integration.
- User profile page displaying individual statistics.
- Achievement badges.
- Leaderboard for top scores.
- New 'Colors' game mode alongside the traditional 'Numbers'.
- Difficulty levels (Easy, Medium, Hard) with customizable combination length and time limits.
- Points-based scoring system.
- Difficulty-adjusted timers.
- Hint feature to aid in solving combinations.
- Modern design and animations to enhance user experience
- Deployment using Docker and Render
Click to play the game here
(Note: There may be a short wait time when accessing the game, as it is hosted on Render.com, which may put the app to sleep during periods of inactivity.)
- Java 8 or higher
- Maven
- MySQL Workbench
- Clone the repository
- Open the project in your IDE
- Create a new database in MySQL Workbench
- Update the database connection details in the 'application.properties'.
- Run the project
- Navigate to http://localhost:8080/
- Enjoy the game!
- Play as a guest or register to track scores and achievements.
- Start a new game by selecting difficulty and game type in settings.
- Guess the combination of numbers or colors, receiving feedback for correct guesses and correct positions.
- Win by correctly guessing the entire combination.
- Use hints if needed. This will reveal a guess you haven't tried yet.
- Game ends after a correct guess, running out of turns, or time.
- Scores are tracked for registered users (score is based on the difficulty level).
- View your profile and leaderboard standings.
The game is built on Spring boot framework and implements the Model-View-Controller (MVC) pattern.
- The 'controller' package: Manages HTTP requests and routing.
- The 'manager' package: Handles game logic, combination generation, scoring, and user interactions.
- The 'model' package: Contains game state, types, guess history, and other game-related data.
- The 'view' package: Includes Thymeleaf templates for the frontend.