import java.awt.*;
import java.util.*;
import Raster;


class Playfield extends Raster {
  Raster background;		// a Raster to hold background image (we won't change this)
  Vector sprites;		// a Vector of AnimatedSprite's
  int scrollX, scrollY;		// the current offsets for the background image

  public Playfield(Image bgnd) {
    // You need to provide this code
  }

  /* Increment scroll offsets */
  public void scroll(int dx, int dy) {
    // You need to provide this code
  }

  /* Initialize the scroll offsets */
  public void setScroll(int x, int y) {
    scrollX = x;
    scrollY = y;
  }

  /* Add one sprite to the Vector for this Playfield */
  public void addSprite(AnimatedSprite s) {
    sprites.addElement(s);
  }

  /* Remove one sprite from the Vector for this Playfield */
  public void removeSprite(AnimatedSprite s) {
    sprites.removeElement(s);
  }

  /**
   * Draw the Playfield:
   *  Copy the offset background into playfield raster
   *  Draw each Sprite
   */
  public void Draw( ) {
    // You need to provide this code
  }

  public void reset()
  {
    sprites.removeAllElements();
    Draw();
  }
}
