let my_draw s =
Curses.werase s.window;
waddstr s.window 0 0
("------------------------ Pathfinding Visualizer "^
"------------------------");
waddstr s.window 40 1 "s: Set source";
waddstr s.window 40 2 "z: Algorithm visualization";
waddstr s.window 40 3 "x: Path optimizer visualization";
waddstr s.window 40 4 (sprintf "p: %s automatic pathfinding "
(if s.auto_path
then "Disable"
else "Enable"));
waddstr s.window 40 5 "enter: New map";
waddstr s.window 40 6 "q: Quit";
waddstr s.window 0 1 (sprintf "(a)lg: %s"
(get_pathfinding_name s.alg));
waddstr s.window 0 2 (sprintf "(d)ist: %s"
(get_dist_alg_name s.dist_alg));
waddstr s.window 0 3 (sprintf "path (o)pt: %s"
(get_path_opt_alg_name s.path_opt_alg));
waddstr s.window 0 4 (sprintf "(m)ap: %s"
(get_map_type_name s.map_type));
printcave s.window_cave s.cave;
draw_path s;
match s.cursor with (x,y) ->
waddstr s.window_cave x y "@";
refresh s