Professional Documents
Culture Documents
Graphics;
public Passenger(int xAxis, int yAxis, int weight, int src, int dest)
{
this(xAxis, yAxis, 10, 50, weight, src, dest);
}
public Passenger(int xAxis, int yAxis, int width, int height, int weight, int
src, int dest)
{
this.xAxis = xAxis;
this.yAxis = yAxis;
this.width = width;
this.height = height;
this.weight = weight;
this.sourceFloor = src;
this.destinationFloor = dest;
this.currentFloor = src;
this.destinationPosX = -1;
this.mode = Mode.WAIT;
this.direction = Mode.LEFT;
}
if (xAxis == destinationPosX)
{
mode = Mode.WAIT;
}
else
{
mode = direction == Mode.LEFT ? Mode.LEFT : Mode.RIGHT;
}
step();
}