Class TruckAgent

java.lang.Object
  extended bySimpleTurtle
      extended byTurtle
          extended byAgent
              extended byDEAgent
                  extended byTruckAgent

public class TruckAgent
extends DEAgent

TrackAgent -- delivers product from Factory to Warehouse.


Field Summary
 
Fields inherited from class DEAgent
blocked
 
Fields inherited from class Agent
MAXSPEED, myPict, PROB_OF_STAY, randNumGen, simulation, speed
 
Constructor Summary
TruckAgent(int x, int y, ModelDisplay modelDisplayer, Simulation thisSim)
          Constructor that takes the x and y and a model display to draw it on
TruckAgent(ModelDisplay modelDisplayer, Simulation thisSim)
          Constructor that takes the model display (the original position will be randomly assigned)
 
Methods inherited from class DEAgent
init, isBlocked, isReady, processEvent, unblocked, validTime, waitFor
 
Methods inherited from class Agent
act, act, countInRange, die, getClosest, getSimulation, getSpeed, setSpeed
 
Methods inherited from class Turtle
square
 
Methods inherited from class SimpleTurtle
backward, drawInfoString, drop, forward, forward, getBodyColor, getDistance, getHeading, getInfoColor, getModelDisplay, getName, getPen, getPenColor, getPenWidth, getPicture, getShellColor, getShowInfo, getXPos, getYPos, hide, isPenDown, isVisible, moveTo, paintComponent, penDown, penUp, setBodyColor, setColor, setHeading, setInfoColor, setModelDisplay, setName, setPen, setPenColor, setPenDown, setPenWidth, setPicture, setShellColor, setShowInfo, setVisible, show, toString, turn, turnLeft, turnRight, turnToFace, turnToFace, updateDisplay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TruckAgent

public TruckAgent(ModelDisplay modelDisplayer,
                  Simulation thisSim)
Constructor that takes the model display (the original position will be randomly assigned)

Parameters:
modelDisplayer - thing that displays the model
thisSim - my simulation

TruckAgent

public TruckAgent(int x,
                  int y,
                  ModelDisplay modelDisplayer,
                  Simulation thisSim)
Constructor that takes the x and y and a model display to draw it on

Parameters:
x - the starting x position
y - the starting y position
modelDisplayer - the thing that displays the model
thisSim - my simulation