@Override
	public void run() {
		try {
			myOut.writeInt(myId);
			myOut.flush();
			System.out.println("Sent ID");
		} catch (IOException e2) {
			// TODO Auto-generated catch block
			e2.printStackTrace();
		}
		
		try {
			System.out.println("Outside while loop");
			System.out.println(myIn.available());
			while (true) {
				try {
					System.out.println("Waiting for boat...");
					double[] receivedArray = (double[]) myIn.readObject();
					System.out.println("Received boat");
					
					for (int i = 0; i < myUsers.length; i++) {
						if (myUsers[i] != null) {
							myUsers[i].myOut.writeObject(receivedArray);
							myUsers[i].myOut.flush();
							System.out.println("Sent boat");
						}
					}
					
				} catch (ClassNotFoundException e) {
					e.printStackTrace();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
					System.out.println("IOException thrown");
					/*try {
						myUsers[myId].myIn.close();
						myUsers[myId].myOut.close();
					} catch (IOException e1) {
						// TODO Auto-generated catch block
						e1.printStackTrace();
					}
					myUsers[myId] = null;*/
				}
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}