@Override
	public void receiveData(Request r) {
		String cmd = r.getCommand();
		// parse data request here

		if (cmd.equals(Constants.LANE_PURGE_COMMAND)) {
			purge();

		}

		else if (cmd.equals(Constants.LANE_SET_AMPLITUDE_COMMAND)) {
			amplitude = (Integer) r.getData();
			speed = (int) 1.5 * amplitude;
		}

		else if (cmd.equals(Constants.LANE_TOGGLE_COMMAND)) {
			laneOn = (Boolean) r.getData();

		} else if (cmd.equals(Constants.LANE_SET_STARTLOC_COMMAND)) {
			location = (Location) r.getData();

		} else if (cmd.equals(Constants.LANE_RECEIVE_PART_COMMAND)) {
			PartData pd = (PartData) r.getData();
			receivePart(pd.getPartType(), pd.getQuality());

		} else if (cmd.equals(Constants.LANE_GIVE_PART_TO_NEST)) {
			givePartToNest();

		} else if (cmd.equals(Constants.LANE_SET_JAM_COMMAND)) {
			unjamming = false;
			jammed = true;
			jamLoc = (Location) r.getData();
			jamLocX = location.getX() + jamLoc.getX();
			// System.out.println("	LANEGD" + laneID + " JAM LOC SET");

		} else if (cmd.equals(Constants.LANE_UNJAM_COMMAND)) {
			unjamming = true;
			if (jammed) {
				client.startPokeflute();
			} else {
//				client.sendData(new Request(Constants.MSGBOX_DISPLAY_MSG,
//						Constants.LANE_TARGET + laneID, 
//						"Professor Oak: The lane is working again!"));
			}
			// System.out.println("	LANEGD" + laneID +
			// "RECEIVED UNJAM COMMAND");

		} else {
			System.out.println("LANE_GD: command not recognized.");
		}
	}