package com.lagopusempire.lagopuscommandsystem;

import java.util.Scanner;

/**
 *
 * @author MrZoraman
 */
public class Main
{
    public static void main(String[] _args)
    {
        Scanner scan = new Scanner(System.in);
        LagopusCommandSystem lcs = new LagopusCommandSystem();
        
        lcs.registerCommand("a", (preargs, args) -> {System.out.println("Hello!");});
        lcs.registerCommand("a b", (preargs, args) -> {System.out.println("wah!");});
        //TODO: 'ab' = wah!
        lcs.registerCommand("b", (preargs, args) -> {System.out.println("Hello again!!");});
        
        while(true)
        {
            System.out.print("> ");
            String input = scan.nextLine();
            if(input.equalsIgnoreCase("exit"))
                break;
            else
                lcs.execute(input);
        }
    }
}

@@ -162,9 +162,8 @@
 g%5B%5D 
-_
 args
@@ -166,24 +166,79 @@
 args)%0A    %7B%0A
+        new Main();%0A    %7D%0A    %0A    public Main()%0A    %7B%0A
         Scan
@@ -381,144 +381,62 @@
 a%22, 
-(preargs, args) -%3E %7BSystem.out.println(%22Hello!%22);%7D);%0A        lcs.registerCommand(%22a b%22, (preargs, args) -%3E %7BSystem.out.println(%22wah!%22);%7D
+this::a);%0A        lcs.registerCommand(%22a b%22, this::a_b
 );%0A 
@@ -499,65 +499,15 @@
 b%22, 
-(preargs, args) -%3E %7BSystem.out.println(%22Hello again!!%22);%7D
+this::b
 );%0A 
@@ -763,10 +763,334 @@
 %7D%0A    %7D%0A
+    %0A    public void a(String%5B%5D preargs, String%5B%5D args)%0A    %7B%0A        System.out.println(%22Hello!%22);%0A    %7D%0A    %0A    public void a_b(String%5B%5D preargs, String%5B%5D args)%0A    %7B%0A        System.out.println(%22wah!%22);%0A    %7D%0A    %0A    public void b(String%5B%5D preargs, String%5B%5D args)%0A    %7B%0A        System.out.println(%22Hello again!%22);%0A    %7D%0A
 %7D%0A

java 8 is fun