public void updatePosition() { if (xPos < xDestination) xPos++; else if (xPos > xDestination) xPos--; if (yPos < yDestination) yPos++; else if (yPos > yDestination) yPos--; if ((xPos == xDestination && yPos == yDestination) && (xPos == xPlatingArea) && (yPos == yPlatingArea)) { agent.msgAtPlatingArea(); } if ((xPos == xDestination && yPos == yDestination) && (xPos == xKitchen) && (yPos == yKitchen)) { agent.msgAtKitchen(); } if ((xPos == xDestination && yPos == yDestination) && (xPos == xDefault) && (yPos == yDefault)) { agent.msgAtDefault(); } }
public String getName() { return agent.getName(); }