public void connect(String IP, int port) {
		Socket socket = null;
		try {
			socket = new Socket(IP, port);
			DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
			dos.writeInt(udpPort);
			DataInputStream dataInputStream = new DataInputStream(socket.getInputStream());
			int id = dataInputStream.readInt();
			tc.myTank.id = id;
			System.out.println("Connect server");
		} catch (UnknownHostException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if(socket != null) {
				try {
					socket.close();
					socket = null;
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
		
	}