// Path: src/main/java/jterm/io/output/TextColor.java
// public enum TextColor {
//     INPUT, PATH, PROMPT, INFO, ERROR;
// 
//     String ansi;
//     Color color;
// 
//     public static void initHeadless() {
//         //TODO: Switch these back when ANSI is fixed in terminal
//         INPUT.ansi = "";
//         PATH.ansi = "";
//         PROMPT.ansi = "";
//         INFO.ansi = "";
//         ERROR.ansi = "";
// //        INPUT.ansi = "\\u001b[31m";
// //        PATH.ansi = "\\u001b[31m";
// //        PROMPT.ansi = "\\u001b[31m";
// //        INFO.ansi = "\\u001b[31m";
// //        ERROR.ansi = "\\u001b[31m";
//     }
// 
//     public static void initGui() {
//         INPUT.color = new Color(255, 255, 255);
//         PATH.color = new Color(142, 114, 77);
//         PROMPT.color = new Color(193, 122, 27);
//         INFO.color = new Color(150, 150, 150);
//         ERROR.color = new Color(140, 40, 40);
//     }
// 
//     public Color getColor() {
//         return color;
//     }
// }


import java.util.ArrayList;
import jterm.io.output.TextColor;
import java.io.*;
import java.net.Socket;
/*
* JTerm - a cross-platform terminal
* Copyright (C) 2017 Sergix, NCSGeek
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package jterm;



public class Client implements Runnable {
    private static BufferedReader input;

    public void run() {
        while (true) {
            try {
                String output = Client.input.readLine();
                if (output != null) {
                    JTerm.out.println(TextColor.INFO, output);
                }
            } catch (IOException e) {
                return;
            }
        }
    }

    public static void connect(ArrayList<String> options) {
        String address = "0.0.0.0";
        String portInput = "80";
        boolean next = false;

        for (String option : options) {
            if (option.equals("-h")) {
// Path: src/main/java/jterm/io/output/TextColor.java
// public enum TextColor {
//     INPUT, PATH, PROMPT, INFO, ERROR;
// 
//     String ansi;
//     Color color;
// 
//     public static void initHeadless() {
//         //TODO: Switch these back when ANSI is fixed in terminal
//         INPUT.ansi = "";
//         PATH.ansi = "";
//         PROMPT.ansi = "";
//         INFO.ansi = "";
//         ERROR.ansi = "";
// //        INPUT.ansi = "\\u001b[31m";
// //        PATH.ansi = "\\u001b[31m";
// //        PROMPT.ansi = "\\u001b[31m";
// //        INFO.ansi = "\\u001b[31m";
// //        ERROR.ansi = "\\u001b[31m";
//     }
// 
//     public static void initGui() {
//         INPUT.color = new Color(255, 255, 255);
//         PATH.color = new Color(142, 114, 77);
//         PROMPT.color = new Color(193, 122, 27);
//         INFO.color = new Color(150, 150, 150);
//         ERROR.color = new Color(140, 40, 40);
//     }
// 
//     public Color getColor() {
//         return color;
//     }
// }


// Path: src/main/java/jterm/Client.java
import java.util.ArrayList;
import jterm.io.output.TextColor;
import java.io.*;
import java.net.Socket;

/*
* JTerm - a cross-platform terminal
* Copyright (C) 2017 Sergix, NCSGeek
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package jterm;



public class Client implements Runnable {
    private static BufferedReader input;

    public void run() {
        while (true) {
            try {
                String output = Client.input.readLine();
                if (output != null) {
                    JTerm.out.println(TextColor.INFO, output);
                }
            } catch (IOException e) {
                return;
            }
        }
    }

    public static void connect(ArrayList<String> options) {
        String address = "0.0.0.0";
        String portInput = "80";
        boolean next = false;

        for (String option : options) {
            if (option.equals("-h")) {
                JTerm.out.println(TextColor.INFO, "Command syntax:\n\tconnect [-h] [-p port] address\n\n"