Draw path from exit after solving
This commit is contained in:
parent
f19881fd04
commit
6675c55916
7
main.c
7
main.c
@ -204,6 +204,13 @@ int main(void)
|
|||||||
maze[0][0].visited = true;
|
maze[0][0].visited = true;
|
||||||
random_walk(accessible_and_unvisited, solve_visit, solve_start);
|
random_walk(accessible_and_unvisited, solve_visit, solve_start);
|
||||||
|
|
||||||
|
// Draw exit path
|
||||||
|
draw_maze();
|
||||||
|
const int x = PX(MARGIN + GRID_SIZE + 1), y = PX(MARGIN + GRID_SIZE);
|
||||||
|
XSetForeground(dpy, ctx, visited_col);
|
||||||
|
XFillRectangle(dpy, window, ctx, x, y, PX(1), PX(1));
|
||||||
|
XFlush(dpy);
|
||||||
|
|
||||||
// Wait for window exit
|
// Wait for window exit
|
||||||
bool is_del = false;
|
bool is_del = false;
|
||||||
do {
|
do {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user