This is a simple, interactive color flooding game developed in Java using the Swing framework. The game logic is primarily based on the Depth-First Search (DFS) algorithm. The purpose of this project is to create a fun and visual approach to understanding and implementing the DFS algorithm.
The game starts with a grid filled with random colors. When a cell is clicked, it changes the color of the initial grid cell (top-left) and all connected cells to the clicked cell's color. The objective is to fill the grid with a single color in the fewest number of steps.
Ensure you have the following installed on your local machine:
- Java (version 8 or above)
- Clone this repository to your machine.
- Navigate to the root directory in your terminal.
- Compile the Main.java file:
javac Main.java
- Run the compiled Main class:
java Main
- Java
- Swing for GUI
Here are a few screenshots of the game: