Commits

vfiack  committed 942a25f

small refactoring

  • Participants
  • Parent commits e1d9805

Comments (0)

Files changed (1)

File maze/sdlmaze.ml

   let sfx = Sdlmixer.loadWAV "data/sfx/success.wav" in
   Sdlmixer.play_sound sfx
   
-let walk screen maze path =
-  List.iter (draw_dot screen Sdlvideo.blue maze) path
 
 (* interactions *)
 
   let open Sdlevent in
   let open Sdlkey in
   let path = Astar.Pathfinding.find_path maze start goal in
-  walk screen maze path;
+  let walk path = List.iter (draw_dot screen Sdlvideo.blue maze) path in
+  walk path;
   let rec loop () =
     match wait_event () with
     | QUIT -> raise Escape