Welcome to the Maze Game project! This project allows you to play a maze game with your friend.
The goal of this project is to provide an interactive maze game where players can navigate through a maze with their friend. The maze is randomly generated using depth-first search algorithm.
To install and run the code, follow these steps:
- Install enviro v1.61.
- Clone the repository to your local machine.
- Navigate to the project directory and run
make
. - run
esm start
- run
enviro
- Navigate to
http://localhost
Once the game is running, follow these instructions to play:
- Click
RESTART
button to regenerate the maze and reset the robot. - For player 1 (green robot), use the W, A, S, D keys to move.
- For player 2 (red robot), use arrow keys to move.
- Navigate through the maze to reach the block with the same color of your robot to win.
- Maze Generation: Generating a maze with proper connectivity and obstacles posed a challenge. This was addressed by implementing a depth-first search algorithm in the MazeGenerator class.
- Agent Coordination: Coordinating the add and remove of agents and ensuring they interact properly within the maze required careful handling. This was resolved by implementing the CoordinatorController class to manage agent initialization and clear.
- User Interface: Providing clear instructions and visual feedback for players was important. This was tackled by designing a simple interface and updating it dynamically based on game events.
This project get inspiration and utilizes code from enviro examples.
Enjoy playing the Maze Game! 🎮🌟