Credit: https://github.com/joewing
You can find many mazegeneration programs in C on the web. Many of those output the mazes as texts. In this example, we’re going to set up Visual Studio Code (aka VS Code) and write a Cprogram that uses the SDL2 library to draw the maze and then solve it.
For this tutorial, the program was developed on a Raspberry Pi 4B, but a 3B would work equally as well. We’ll install this software:
•SDL2 library
•Visual Studio Code and extension
• The Clang compiler and linker
The SDL2 (Simple Direct Media) library isn’t installed by default on a Pi. To compile against SDL2, we need the development versions, which include header files for C and libraries to link against. To see what’s available, run this command in a terminal:
Of the six libraries shown, we only need libsdl2-dev. Before you