import java.util.*; import java.awt.*; /** A tanker is a kind of thing that wanders across the screen, spilling oil blobs into the environment. @author Ben Dugan, Hal Perkins CSE 142 Summer 2001, Homework 6 */ public class Tanker implements Thing { private int x, y; private int blobsPerCycle; /** Create a new Tanker that spills the given number of blobs per cycle, and at the given x y location*/ public Tanker(int blobsPerCycle, int x, int y) { this.x = x; this.y = y; this.blobsPerCycle = blobsPerCycle; } /** Always move to the right one pixel. */ public void move() { this.x = this.x + 1; } /** On each cycle some number of blobs are spilled into the environment. */ public void spawn(ArrayList v) { for (int i=0; i