Skip to content

Maze generator, solver and interactive game written in Python

Notifications You must be signed in to change notification settings

AlexandruValeanu/Mazify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mazify

Mazify is a tool that can be used to generate and solve mazes. There is also a game module written using Pygame if you'd like to see how fast can you solve a maze.

Creating a maze

python3 main.py create rows=10 columns=20 file-path='mazes/small'

small maze

python3 main.py create rows=100 columns=200 file-path='mazes/big'

big maze

Solving a maze

python3 main.py solve 'start=(1,1)' 'end=(7,6)' file-path='mazes/small.txt'

small maze

python3 main.py solve 'start=(34,19)' 'end=(76,163)' file-path='mazes/big.txt'

big maze big maze dfs

Playing a game

python3 main.py play file-path='mazes/big.txt'

game

Maze solvers

There are 3 maze-solvers implemented:

  • Depth-first search maze-solver
  • Breadth-first search maze-solver
  • A* graph-search maze-solver

Key controls

  • z -> Highlight current location
  • x -> Highlight destination
  • t -> Show solution from current location
  • c -> Decrease frame rate
  • v -> Increase frame rate
  • f -> Show frame rate
  • Arrows or WASD for movement

Stuff used to make this:

About

Maze generator, solver and interactive game written in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages