This Java program implements an A* pathfinding algorithm using LibGDX, allowing users to place walls on a grid with left-click, reset the grid with right-click, and run the pathfinding algorithm with the space bar.
- Interactive grid-based environment for pathfinding visualization.
- Left-click to place walls on the grid.
- Right-click to reset the grid.
- Space bar to run the A* pathfinding algorithm and visualize the shortest path.
- Visual feedback for pathfinding process and results.
- Java Development Kit (JDK) 8 or higher
- LibGDX library
- Clone or download the repository to your local machine.
- Open the project in your preferred Java IDE (e.g., IntelliJ IDEA, Eclipse).
- Make sure to configure the project to use LibGDX libraries.
- Build the project to ensure all dependencies are resolved.
- Run the program using your IDE or compile it into a runnable JAR file.
- Upon running, you'll see an interactive grid display.
- Use the following controls:
- Left-click: Place walls on the grid.
- Right-click: Reset the grid (clear walls and start over).
- Space bar: Run the A* pathfinding algorithm and visualize the shortest path.
Here's a brief example of how to use the program:
- Run the program.
- Left-click on the grid to place walls where obstacles are present.
- Right-click to reset the grid if needed.
- Press the space bar to execute the A* pathfinding algorithm.
- Observe the visualization of the algorithm's process and the shortest path found.