A C# console application demonstrating recursive backtracking for maze pathfinding, built with clean architecture and SOLID principles.
S _ _ _ _ _ _ _ S * * * * * _ _
X X X X _ _ _ _ → X X X X * _ _ _
_ _ _ _ _ _ X X _ _ _ _ * _ X X
_ _ X X X _ _ _ _ _ X X X * * _
_ _ _ _ _ _ _ G _ _ _ _ _ _ * G
- Recursive Depth-First Search — Explores all paths with backtracking to find the solution
- Dependency Injection — Uses Unity container for IoC
- Factory Pattern — Extensible algorithm selection via
ISolvingAlgorithmFactory - Clean Architecture — Interface-driven design with clear separation of concerns
- Comprehensive Tests — Unit tested with NUnit, Moq, and FluentAssertions
Maze/
├── Algorithms/ # Pathfinding algorithms (recursive solver)
├── Core/ # Base classes, factories, flow coordination
├── Flow/ # Action pipeline (read → load → solve)
├── Models/ # Domain models (MazeModel, Node, Operation)
└── Maze.Tests/ # Unit tests
| Symbol | Meaning |
|---|---|
S |
Start |
G |
Goal |
X |
Wall |
_ |
Path |
# Clone and build
git clone https://github.com/yourusername/Maze.git
cd Maze
dotnet build
# Run with a maze file
dotnet run --project Maze -- Mazes/maze-map.txt| Category | Tools |
|---|---|
| Language | C# / .NET |
| DI Container | Unity |
| Logging | log4net |
| Testing | NUnit, Moq, FluentAssertions |
MIT