Skip to content

Implementing labyrinth & visualization of DFS & BFS

Notifications You must be signed in to change notification settings

alami-oussama/Labyrinth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Labyrinth

This project is about implementing labyrinth with C using DFS (Depth-first search) and BFS (Breadth-first search) algorithms.

Screenshots

Maze generating

  • Generating a random maze rusing Depth-first search (DFS) algorithm

Maze generating

Maze solving

  • Solving the maze by finding the shortest path using Breadth-first search (BFS) algorithm

Maze sloving

SDL2 instalation

Linux instalation

  • Run the following commands: (for ubuntu)
    • sudo apt update (update packages list)
    • sudo apt install build-essential (install gcc and make)
    • apt-get install libsdl2-dev (install SDL2)
  • For other distributions, you can check this link

Windows instalation

  • Download and install msys2 from https://www.msys2.org/
  • Open start menu and open the msys2 terminal (MSYS2 MinGW 64-bit)
  • Run the following commands: (for 64 bit systems)
    • pacman -Syu (update the package database and base packages)
    • pacman -Su (update the rest of the base packages)
    • pacman -S --needed base-devel mingw-w64-x86_64-toolchain (install gcc and make)
    • pacman -S mingw-w64-x86_64-SDL2 (install SDL2)

Build the project

  • Open terminal and go to projet's directory (by typing cd project_diretory)
  • Run the command make
  • You can also build the project without using make by running the command line gcc src/*.c -o application `sdl2-config --cflags --libs`