/*
 * The MIT License
 *
 * Copyright 2016 andrew.
 *
 * 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 com.github.agsimmons.wordpiles.client;

public class Client {
    
}

@@ -1175,33 +1175,1523 @@
 t;%0A%0A
-public class Client %7B%0A    
+import java.io.IOException;%0Aimport java.net.Socket;%0Aimport java.util.Scanner;%0A%0Apublic class Client %7B%0A%0A    private final int DEFAULT_PORT = 8888;%0A%0A    private Socket clientSocket;%0A%0A    public Client() %7B%0A        createSocket();%0A    %7D%0A%0A    private void createSocket() %7B%0A        Scanner scanner = new Scanner(System.in);%0A        String serverIP;%0A        String serverPort;%0A        int port = 0;%0A%0A        boolean isValidAddress = false;%0A        do %7B%0A            boolean addressChosen = false;%0A            do %7B%0A%0A                System.out.print(%22Server IP: %22);%0A                serverIP = scanner.nextLine();%0A%0A                System.out.print(%22Server Port (8888): %22);%0A                serverPort = scanner.nextLine();%0A                if (serverPort.equals(%22%22)) %7B%0A                    port = DEFAULT_PORT;%0A                    addressChosen = true;%0A                %7D else %7B%0A                    try %7B%0A                        port = Integer.parseInt(serverPort);%0A                        addressChosen = true;%0A                    %7D catch (NumberFormatException e) %7B%0A                        System.out.println(%22ERROR: Invalid port!%22);%0A                    %7D%0A                %7D%0A%0A            %7D while (!addressChosen);%0A            %0A            try %7B%0A                clientSocket = new Socket(serverIP, port);%0A                isValidAddress = true;%0A            %7D catch (IOException ex) %7B%0A                System.out.println(%22ERROR: Could not create socket to server!%22);%0A            %7D%0A            %0A        %7D while (!isValidAddress);%0A    %7D%0A
 %0A%7D%0A

Implement functionality for client to open a socket to the server