Carve the maze
Start with every wall closed. Pick an unvisited neighboring cell, remove the wall between them, and keep walking. If there are no unvisited neighbors, backtrack. This is randomized depth-first search.
Here's the idea, the logic, the files, and the honest version of how this project came together. No magic “I built everything overnight” story.
At the end of semester one, I wanted my final project to be something a faculty member could actually use instead of just scroll through. A maze is easy to understand as a player, but interesting to explain as a programmer: cells, walls, random generation, movement, and a pathfinding hint.
The browser game is the main project. There are also two companion tools in the repository: a C++ maze solver to practice classes and a Python/NumPy script to look at exported run data. They are separate programs, not secretly running on GitHub Pages.
Each square is a cell. A cell keeps track of four walls: north, east, south and west. The player can cross an edge only when its wall has been removed.
Start with every wall closed. Pick an unvisited neighboring cell, remove the wall between them, and keep walking. If there are no unvisited neighbors, backtrack. This is randomized depth-first search.
Arrow keys, WASD, swipe, and on-screen buttons all call the same movement function. It checks the wall, updates the player's cell, and counts a step only when the move is valid.
To find the shortest route from where you stand to the exit, the game explores reachable cells layer by layer. That's breadth-first search. The resulting route appears briefly on the board.
On reaching the exit, time, steps, and hints are saved in
localStorage. That's a personal record on one
browser — not an online leaderboard.
Carving visits every cell and connects each newly visited cell to the maze. So there is a route between the start and finish. The hint can find it too.
Different subjects have different jobs here. I didn't force server-side code into a static website just to tick a box.
Three pages with navigation, game controls and build notes.
Responsive layouts, visual style, transitions and reduced-motion support.
Maze generation, canvas drawing, keyboard/touch input, timer and pathfinding.
A local library copy helps handle the mobile menu and interactive page details.
A separate Maze class and breadth-first-search
CLI solver for exported mazes.
A separate script summarizes JSON run data exported from the game.
Studied this semester, but deliberately not used here: GitHub Pages can't execute PHP.
The C++ and Python tools run locally from the GitHub repo. The website itself works on GitHub Pages with no backend.
Where this first version stands: I chose the maze-game idea, the Sem 1 scope, and asked for a multi-page website with animation and a real explanation of its logic. AI helped turn that brief into the initial site design, text and working code, including the browser game and companion scripts.
What I need to do next: Play-test it, read the code, change the parts I want to make my own, record bugs I fixed, and replace these notes with a specific account of my work. I should be able to explain the maze generator, hint search, storage, and each tool during my demo.
I will be honest about how I used AI and clearly distinguish between AI-assisted work and my own contributions. Rather than claiming an arbitrary percentage of ownership, I will focus on demonstrating my understanding, the changes I made, the problems I solved, and the knowledge I gained while developing the project.