about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--algorithms/java/DFS.java18
-rw-r--r--lib/Fornax/CLI.rakumod4
2 files changed, 12 insertions, 10 deletions
diff --git a/algorithms/java/DFS.java b/algorithms/java/DFS.java
index ba3d8d8..6b46ca6 100644
--- a/algorithms/java/DFS.java
+++ b/algorithms/java/DFS.java
@@ -40,8 +40,8 @@ public class DFS {
             System.out.println();
 
             // Found a solution, exiting.
-            // if (maze[curx][cury] == '$')
-            //     System.exit(0);
+            if (maze[curx][cury] == '$')
+                System.exit(0);
 
             if (visited[curx][cury]) {
                 continue;
@@ -55,13 +55,13 @@ public class DFS {
 
     public static void main(String[] args) {
         char[][] maze = {
-            {'.', '#', '.'},
-            {'.', '.', '.'},
-            {'.', '#', '.'},
-            {'.', '.', '.'},
-            {'.', '.', '#'},
-            {'.', '#', '.'},
-            {'.', '.', '$'},
+            {'.', '#', '.', '#', '.'},
+            {'.', '.', '.', '.', '.'},
+            {'.', '#', '.', '.', '$'},
+            {'.', '.', '.', '#', '.'},
+            {'.', '.', '.', '.', '#'},
+            {'.', '#', '#', '.', '.'},
+            {'.', '.', '.', '.', '.'},
         };
 
         boolean[][] visited = new boolean[maze.length][maze[0].length];
diff --git a/lib/Fornax/CLI.rakumod b/lib/Fornax/CLI.rakumod
index cdc910d..9f6c569 100644
--- a/lib/Fornax/CLI.rakumod
+++ b/lib/Fornax/CLI.rakumod
@@ -121,7 +121,9 @@ multi sub MAIN(
 
     put "[fornax] Generated images." if $verbose;
     put "[fornax] Creating a slideshow." if $verbose;
-    run «ffmpeg -loglevel error -r "$frame-rate" -i "$output/\%08d.png"
+
+    my Str $log-level = $verbose ?? "info" !! "error";
+    run «ffmpeg -loglevel "$verbose" -r "$frame-rate" -i "$output/\%08d.png"
                 -vcodec libx264 -crf 28 -pix_fmt yuv420p "$output/solution.mp4"»;
     put "[fornax] Output: '$output'";
 }