How djsahagun15/pathfinder works
PathFinder is an interactive grid-based pathfinding visualizer. Users edit start/end positions, walls and terrain, choose an algorithm and movement options, then run or pause a search and inspect its explored nodes and resulting path. The principal runtime loop is owned by PathFinder, which coordinates the grid, control panel and selected algorithm. The README also documents camera pan/zoom and reset/clear controls. Algorithm implementations are listed from the repository tree; their internal search details were not sampled.
Main entry points: pathfinder.cpp PathFinder runtime · pathfinding_algorithm.cpp Algorithm base · grid.cpp Editable grid · control_panel.cpp Control panel
Components 13
Application control
- Application entry
src/main.cpp - PathFinder runtime
src/pathfinder.cpp
Grid and display
- Editable grid
src/grid.cpp - Cell state and costs
src/node.cpp - Camera controls
src/camera.cpp
Pathfinding
- Algorithm base
src/pathfinding_algorithm.cpp - BFS
src/bfs.cpp - Dijkstra
src/dijkstra.cpp - A*
src/astar.cpp - Greedy best-first
src/gbs.cpp - Bidirectional BFS
src/bidirectional_bfs.cpp
User controls
- Control panel
src/control_panel.cpp
Other components
- User
Connections 21
- User → Application entry: starts app
- Application entry → PathFinder runtime: creates and runs
- User → Control panel: sets options
- User → Editable grid: edits cells
- User → Camera controls: pans and zooms
- Control panel → PathFinder runtime: commands solver
- PathFinder runtime → Control panel: draws controls
- PathFinder runtime → Editable grid: updates and draws
- Editable grid → Cell state and costs: stores and draws
- PathFinder runtime → Camera controls: updates view
- PathFinder runtime → BFS: selects and dispatches
- PathFinder runtime → Dijkstra: selects and dispatches
- PathFinder runtime → A*: selects and dispatches
- PathFinder runtime → Greedy best-first: selects and dispatches
- PathFinder runtime → Bidirectional BFS: selects and dispatches
- BFS → Algorithm base: uses shared search
- Dijkstra → Algorithm base: uses shared search
- A* → Algorithm base: uses shared search
- Greedy best-first → Algorithm base: uses shared search
- Bidirectional BFS → Algorithm base: uses shared search
- Algorithm base → Editable grid: gets neighbors