uwcse.sim
Class Algae

java.lang.Object
  |
  +--uwcse.sim.OilThing
        |
        +--uwcse.sim.Algae
All Implemented Interfaces:
Thing

class Algae
extends OilThing

Algae are green and float around, reproducing every now and then.


Fields inherited from class uwcse.sim.OilThing
alive, rand, world, x, y
 
Constructor Summary
Algae(WorldModel wm, int x, int y)
           
 
Method Summary
 void action()
          Move more or less at random.
 void displayOn(uwcse.graphics.GWindow g)
          Display as a green oval.
 
Methods inherited from class uwcse.sim.OilThing
checkNeighbors, getX, getY, interact, isAlive, kill, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Algae

public Algae(WorldModel wm,
             int x,
             int y)
Method Detail

displayOn

public void displayOn(uwcse.graphics.GWindow g)
Display as a green oval.
Overrides:
displayOn in class OilThing

action

public void action()
Move more or less at random. Reproduce at a 1% rate.
Overrides:
action in class OilThing