public void run() {
		boolean properConnect = true;
		boolean initName = false;
		
		try {
			inClient = new BufferedReader(new InputStreamReader(connect.getInputStream()));
			outClient = new DataOutputStream(connect.getOutputStream());
		} catch(IOException e) {
			System.out.println("Could not establish proper IO at the beginning");
			properConnect = false;
		}
		
		if(properConnect) {
			while(this.connect.isConnected() && (!this.tellQuit)) {
				
				if(!initName){
//establishing of players names and the pieces that that they are assigned. Happens once.
					initNameStats();
					initName = true;
					try {
						this.connect.setSoTimeout(1000);
					} catch (SocketException e) {
						System.out.println("Cannot set timeout");
					}
				}
				
				
//first part of the loop is finding out state of board and sending messages
//to the player. And then receiving their response
				if(this.myPlayNum < 2) {
					if(this.sharedBoard.getFullVic() > 0) {
						this.vict = true;
					} else {
						this.vict = false;
					}
	
					this.yourTurn = myTurn();
					serverSendMessages();
					serverReceiveMessages();
				} else {
					this.tellQuit = true;
				}
			}
		} else {
			System.out.println("Could not establish IO with this connectio");
		}
		try {
			inClient.close();
			outClient.close();
			this.connect.close();
		} catch(IOException clo) {
			System.out.println("Could not close connection properly");
		}
	}