ArtificialTermites
Class Termite
java.lang.Object
|
+--ArtificialTermites.Termite
- final class Termite
- extends java.lang.Object
Method Summary |
private boolean |
cheeseAt()
|
private boolean |
cheeseAt(int direction)
|
private boolean |
cheeseAt(int x,
int y)
|
private boolean |
forbiddenAt(int direction)
|
private boolean |
forbiddenAt(int x,
int y)
|
private void |
getCheese()
|
private void |
getCheese(int direction)
|
private void |
getCheese(int x,
int y)
|
private void |
getWheat()
|
private void |
getWheat(int direction)
|
private void |
getWheat(int x,
int y)
|
private void |
getWood()
|
private void |
getWood(int direction)
|
private void |
getWood(int x,
int y)
|
private void |
move(int direction)
|
void |
paint()
|
private void |
putCheese()
|
private void |
putCheese(int direction)
|
private void |
putCheese(int x,
int y)
|
private void |
putWheat()
|
private void |
putWheat(int direction)
|
private void |
putWheat(int x,
int y)
|
private void |
putWood()
|
private void |
putWood(int direction)
|
private void |
putWood(int x,
int y)
|
private int |
randomFacing()
|
private void |
randomTurn()
|
void |
tick()
|
private boolean |
timeForTurn()
|
private void |
turn(int delta)
|
private boolean |
wheatAt()
|
private boolean |
wheatAt(int direction)
|
private boolean |
wheatAt(int x,
int y)
|
private boolean |
woodAt()
|
private boolean |
woodAt(int direction)
|
private boolean |
woodAt(int x,
int y)
|
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
containingWorld
private World containingWorld
appletWorld
private WorldApplet appletWorld
x
int x
y
int y
facing
int facing
carryingSomething
boolean carryingSomething
carryingWood
boolean carryingWood
carryingWheat
boolean carryingWheat
carryingCheese
boolean carryingCheese
termiteColor
private static java.awt.Color termiteColor
facingXDelta
private static int[] facingXDelta
facingYDelta
private static int[] facingYDelta
Termite
public Termite(World w,
WorldApplet wa,
int xcoord,
int ycoord)
paint
public void paint()
tick
public void tick()
randomFacing
private int randomFacing()
timeForTurn
private boolean timeForTurn()
randomTurn
private void randomTurn()
turn
private void turn(int delta)
move
private void move(int direction)
forbiddenAt
private boolean forbiddenAt(int x,
int y)
woodAt
private boolean woodAt(int x,
int y)
wheatAt
private boolean wheatAt(int x,
int y)
cheeseAt
private boolean cheeseAt(int x,
int y)
woodAt
private boolean woodAt()
wheatAt
private boolean wheatAt()
cheeseAt
private boolean cheeseAt()
forbiddenAt
private boolean forbiddenAt(int direction)
woodAt
private boolean woodAt(int direction)
wheatAt
private boolean wheatAt(int direction)
cheeseAt
private boolean cheeseAt(int direction)
getWood
private void getWood(int x,
int y)
getWheat
private void getWheat(int x,
int y)
getCheese
private void getCheese(int x,
int y)
getWood
private void getWood()
getWheat
private void getWheat()
getCheese
private void getCheese()
getWood
private void getWood(int direction)
getWheat
private void getWheat(int direction)
getCheese
private void getCheese(int direction)
putWood
private void putWood(int x,
int y)
putWheat
private void putWheat(int x,
int y)
putCheese
private void putCheese(int x,
int y)
putWood
private void putWood()
putWheat
private void putWheat()
putCheese
private void putCheese()
putWood
private void putWood(int direction)
putWheat
private void putWheat(int direction)
putCheese
private void putCheese(int direction)