This project is a Labyrinth Game implemented in C# using Windows Forms. It allows players to navigate through a maze and reach the finish point while avoiding walls. The game provides various difficulty levels and a custom mode where the maze size can be adjusted.
Features
-
Maze generation: The game generates a random maze using a recursive algorithm.
-
Maze sizes: Different maze sizes are available, including easy, medium, hard, and custom.
-
Player movement: Players can navigate through the maze using the arrow keys or WASD keys.
-
Timer: The game tracks the time taken by the player to complete the maze.
-
Move counter: The game keeps track of the number of moves made by the player.
-
Reset: Players can reset the game to the initial state.
-
Exit: Players can exit the game.
How to Play
- Use the arrow keys or WASD keys to navigate through the maze.
- Reach the finish point while avoiding walls.
- The timer will start as soon as you make the first move.
- The move counter keeps track of the number of moves made.
- You can reset the game or exit at any time.
Project Structure
The project consists of the following files:
- 'MainForm.cs': Contains the main form class that represents the game window and handles user interactions.
- 'EditMazeSize.cs': Contains a form class for editing the maze size in custom mode.
- 'Cell.cs': Defines a custom control class for representing individual cells in the maze.
- 'Enums.cs': Defines an enum for representing movement directions.
- 'PathPoint.cs': Defines a class for representing a point in the path taken during maze generation.
Usage
To run the Labyrinth Game, follow these steps:
- Ensure that you have a compatible development environment for running C# Windows Forms applications.
- Open the project in your preferred development environment.
- Build the project to compile the executable file.
- Run the executable file to start the game.
- Use the arrow keys or WASD keys to navigate through the maze.
- Reach the finish point to complete the game.
Acknowledgements
This project was assigned to me as a task designated for the highest-achieving students within my high school.
Feel free to modify and extend the project according to your needs. Enjoy playing my Labyrinth Game!