Skip to content

Fredster64/Randomly-Generated-Maze

Repository files navigation

Randomly-Generated Maze Project in Python 

Update 1 (24/9): 
Have implemented Dijkstra's algorithm to improve opponent movement. Still slightly buggy, but a huge improvement on the previous AI. 

This project is essentially a cat-and-mouse style game, in which the player has to navigate a maze before they are caught by the opponent. If you want to play it, simply download the files and run "Maze.py". You will be invited to choose the length and width of the maze, as well as your desired character (cat or dog) before the gameplay begins. 

The maze uses Prim's Algorithm for maze generation, finding a minimum spanning tree of the square lattice on which the maze is set. It features two playable characters and some AI for the opposing player. 

 ----- Please Note! -----
  - To play this game, you'll need to install PyGame. See the PyGame website for instructions on how to do this.
  - Some of the syntax I used in making this game is specific to Python3. As such, it won't run on Python2. 
 ------------------------

This project has improved my skills with: 

- Using pygame to draw basic 2D graphics and imported sprites; 
- Implementing basic OOP and operator overloading; 
- Using my mathematical knowledge to solve programming problems.