Add fire mode
[kaka/cakelight.git] / src / kaka / cakelight / Commands.java
index cbd9e38..8f61713 100644 (file)
@@ -155,15 +155,26 @@ class Commands {
        });
     }
 
-    static Console.Command twoColorNoiseMode() {
+    static Console.Command noiseMode() {
         return modeCommand(new String[] {"n", "noise"}, (console, args) -> {
            if (args.length > 1) {
                console.out("setting multi-color noise mode");
-               return new TwoColorNoiseMode(Stream.of(args)
-                                            .map(arg -> console.parseColor(arg))
+               return new NoiseMode(Stream.of(args)
+                                            .map(console::parseColor)
                                             .toArray(Color[]::new)
-//                     console.parseColor(args[0]),
-//                     console.parseColor(args[1])
+               );
+           }
+           return null;
+       });
+    }
+
+    static Console.Command fireMode() {
+        return modeCommand(new String[] {"f", "fire"}, (console, args) -> {
+           if (args.length > 1) {
+               console.out("setting multi-color fire mode");
+               return new FireMode(Stream.of(args)
+                       .map(console::parseColor)
+                       .toArray(Color[]::new)
                );
            }
            return null;