public static void main(String args[]) throws IOException {
		//Input server check
		System.out.println("Is this the server?");
		Scanner sysIn = new Scanner(System.in);
		String inToken = sysIn.nextLine();
		if(inToken.equalsIgnoreCase("yes")) {
			isServer = true;
		}
		else {
			isServer = false;
		}
		try {
			//Open up the connection
			Socket socket = null;
			ServerSocket server = null;
			if(isServer) {
				System.out.println("Starting");
				server = new ServerSocket(4001);
				System.out.println("Waiting for client");
				socket = server.accept();
				System.out.println("Server has connected.");
			}
			else {
				System.out.println("Client connecting");
				socket = new Socket("Travis-PC", 4001);
			}
			
			//Create the writer and reader
			out = new PrintWriter(socket.getOutputStream(), true);
			in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
			if(isServer) {
				System.out.println("Enter rows");
				int rows = sysIn.nextInt();
				System.out.println("Enter columns");
				int columns = sysIn.nextInt();
				System.out.println("Enter max time");
				maxTime = sysIn.nextInt();
				sysIn.nextLine();
				System.out.println("Enter B or W");
				inToken = sysIn.next();
				send("WELCOME");
				send("INFO " + columns + " " + rows + " " + inToken + " " + maxTime);
				board = new Board(rows, columns);
				if(inToken.equals("W")) {
					ai = new AI(Color.WHITE, (long)(maxTime * .95));
				}
				else {
					ai = new AI(Color.BLACK, (long)(maxTime * .95));
				}
			}
			
			//The execution loop
			while(!gameOver) {
				readAndExecute();
			}
			System.out.println(victoryState);
			
			//Close the sockets
			out.close();
			socket.close();
			if(isServer) {
				server.close();
			}
		} catch (UnknownHostException e) {
			System.out.println("Don't know about host");
		} catch (IOException e) {
			System.out.println("Could get IO connection");
		} catch (BadBoardException e) {
			e.printStackTrace();
		}
	}