uwcse.sim
Class Tanker

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

class Tanker
extends OilThing

A tanker floats through the environment, leaking oil.


Fields inherited from class uwcse.sim.OilThing
alive, rand, world, x, y
 
Constructor Summary
Tanker(WorldModel wm, int x, int y, int bpc)
          Create a new Tanker that spills the given number of blobs per cycle, and at the given x y location
 
Method Summary
 void action()
          Always move to the right one pixel.
 void displayOn(uwcse.graphics.GWindow g)
          A tanker displays itself as a pointy red rectangle
 
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

Tanker

public Tanker(WorldModel wm,
              int x,
              int y,
              int bpc)
Create a new Tanker that spills the given number of blobs per cycle, and at the given x y location
Method Detail

action

public void action()
Always move to the right one pixel.
Overrides:
action in class OilThing

displayOn

public void displayOn(uwcse.graphics.GWindow g)
A tanker displays itself as a pointy red rectangle
Overrides:
displayOn in class OilThing