Ant Farm - Robert Glen Martin
School for the Talented and Gifted
Dallas I.S.D.
A B C F G M P Q S T W

A

act() - Method in class Food
"Do nothing" act method.
act() - Method in class QueenAnt
"Do nothing" act method.

B

BITE - Static variable in class Cake
The size of a bite
BITE - Static variable in class Cookie
The size of a bite
BITE_SIZE - Variable in class Food
The size of a bite

C

Cake - Class in <Unnamed>
A Cake sits around and waits for a WorkerAnt to get food from it.
Cake() - Constructor for class Cake
Constructs a Cake actor.
Cookie - Class in <Unnamed>
A Cookie sits around and waits for a WorkerAnt to get food from it.
Cookie() - Constructor for class Cookie
Constructs a Cookie actor.

F

Food - Class in <Unnamed>
Food is the top level abstract class for different types of food.
Food(int) - Constructor for class Food
Constructs a Food actor.
foodEaten - Variable in class Food
The total amount of food eaten
foodLoc - Variable in class WorkerAnt
Location of a Food object
foodQuantity - Variable in class QueenAnt
Total amount of food that the queen has received.
foodQuantity - Variable in class WorkerAnt
Current amount of food being carried

G

getDesiredDirecton() - Method in class WorkerAnt
Returns the direction that the ant wants to go.
getMoveLocations() - Method in class WorkerAnt
Gets the possible locations for the next move.
giveFood() - Method in class WorkerAnt
Gives food to the calling QueenAnt.

M

makeMove(Location) - Method in class WorkerAnt
Moves this critter to the given location, sets its direction, and sets its color (red = has food, black = does not have food).

P

process(WorkerAnt) - Method in class Food
Gives food and current location to ant.
process(WorkerAnt) - Method in interface Processable
Called by ant to get/give food and to get/give food and queen locations.
process(WorkerAnt) - Method in class QueenAnt
Gets food from and gives current location to ant.
process(WorkerAnt) - Method in class WorkerAnt
Gives current food and queen locations to ant.
Processable - Interface in <Unnamed>
Provides the process method that allows WorkerAnt actors to polymorphically get food from the Food objects (Cake and Cookie) and give food to QueenAnt objects.
processActors(ArrayList<Actor>) - Method in class WorkerAnt
Processes each of the neighboring Ant Farm actors.

Q

QueenAnt - Class in <Unnamed>
A QueenAnt sits around and waits for a WorkerAnt to bring it food.
QueenAnt() - Constructor for class QueenAnt
Constructs a QueenAnt actor.
queenLoc - Variable in class WorkerAnt
Location of a QueenAnt object

S

shareFoodLocation(Location) - Method in class WorkerAnt
Receives the fLoc food location from a Food object.
shareQueenLocation(Location) - Method in class WorkerAnt
Receives the qLoc queen location from a QueenAnt object.

T

takeFood(int) - Method in class WorkerAnt
Takes fQty amount of food from the calling Food.
toString() - Method in class Food
Creates a string that describes this actor.
toString() - Method in class QueenAnt
Creates a string that describes this actor.
toString() - Method in class WorkerAnt
Creates a string that describes this actor.

W

WorkerAnt - Class in <Unnamed>
A WorkerAnt is a critter who's mission is to take food from Cake and Cookie objects and to deliver it to a QueenAnt object.
WorkerAnt() - Constructor for class WorkerAnt
Constructs a WorkerAnt critter.

A B C F G M P Q S T W
© 2007 Robert Glen Martin.
All rights reserved.