Skip to content

Desktop application written in C#, that allows to create maze and display shortest path in this maze from left top to bottom right corner using various path algorithms (Dijkstra, A*, DFS, BFS).

Notifications You must be signed in to change notification settings

piotr-rzepa/maze-generator-csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maze-generator-csharp

Desktop application written in C#, that allows to create and visualize maze generation of various sizes, set by a user, and to find and display shortest path from left top (0,0) to bottom right (Form width, Form height) corner using different path algorithms (Dijkstra, A*, DFS, BFS). Additionaly, the animation speed can be adjusted to suit user's needs, or even disabled at all (Which means only a fully-generated maze will be rendered to the user).

Table of contents

General info

Maze generating algorithm is based on iterative backtracking and it can be represented by this pseudocode:

  1. Choose the initial cell, mark it as visited and push it to the stack
  2. While the stack is not empty
    1. Pop a cell from the stack and make it a current cell
    2. If the current cell has any neighbours which have not been visited
      1. Push the current cell to the stack
      2. Choose one of the unvisited neighbours
      3. Remove the wall between the current cell and the chosen cell
      4. Mark the chosen cell as visited and push it to the stack

Technologies

Project is created with: .NET Framework 4.7.2
Package OptimizedPriorityQueue 4.2.0 by BlueRaja

Algorithm visualization (A* example)

ERROR: NOT FOUND

Setup

To run this project, navigate to the directory where you want to put your repository (Change the test-repo to the location where you want the cloned directory) and use:

cd test-repo
git clone https://github.com/piotr-rzepa/maze-generator-csharp.git

After that, you are able to open project in Microsoft Visual Studio and run Form1.cs to open desktop application 👍.

About

Desktop application written in C#, that allows to create maze and display shortest path in this maze from left top to bottom right corner using various path algorithms (Dijkstra, A*, DFS, BFS).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages