/* 
 * The MIT License
 *
 * Copyright 2015 Fanaen <contact@fanaen.fr>.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package alphagram;

import alphagram.model.Alphagram;
import alphagram.model.Anagram;
import java.util.Scanner;

/**
 *
 * @author Fanaen <contact@fanaen.fr>
 */
public class AlphagramCLI {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in, "UTF-8");
        String line = "";
        boolean pursue = true;
        
        // Display welcome message --
        System.out.println("-- Alphagram --");
        System.out.println("Type \"quit\" to exit.");
        
        while(pursue) {
            System.out.print("> ");
            line = in.nextLine();
            
            if(line.toLowerCase().equals("quit")) {
                pursue = false;
                System.out.println("iQtu. Bey!");
            }
            else {
                Anagram anagram = new Anagram(line);
                Alphagram alphagram = anagram.alphagram();

                System.out.println("# " + alphagram.getRaw() + " (" + alphagram.getShort() + ")");
            }
        }
    }    
}

@@ -1697,16 +1697,18 @@
 to exit.
+%5Cn
 %22);%0A    
@@ -1811,32 +1811,65 @@
 );%0A            %0A
+            // Quit condition --%0A
             if(l
@@ -2016,14 +2016,437 @@
     
-else %7B
+// Standard line --%0A            else %7B%0A                processLine(line);%0A            %7D%0A        %7D%0A    %7D    %0A%0A    private static void processLine(String line) %7B%0A        String%5B%5D words = line.split(%22 %22);%0A        System.out.print(%22# %22);%0A        %0A        // Multiple words --%0A        if(words.length %3E 1) %7B%0A            int i = 0;%0A                     %0A            for (String word : words) %7B            %0A                // Anagram --
 %0A   
@@ -2488,20 +2488,20 @@
 Anagram(
-line
+word
 );%0A     
@@ -2554,16 +2554,32 @@
 gram();%0A
+                
 %0A       
@@ -2607,18 +2607,9 @@
 rint
-ln(%22# %22 + 
+(
 alph
@@ -2673,32 +2673,358 @@
         
-%7D%0A        %7D%0A    %7D    
+    %0A                // Separators --%0A                i++;%0A                System.out.print(i == words.length ? %22 = %22 : %22 + %22);%0A            %7D%0A        %7D%0A        %0A        Anagram anagram = new Anagram(line);%0A        Alphagram alphagram = anagram.alphagram();%0A%0A        System.out.println(alphagram.getRaw() + %22 (%22 + alphagram.getShort() + %22)%22);%0A    %7D
 %0A%7D%0A

Add multiple word processing