import java.awt.Color;
import java.awt.Graphics;

public class Abyss extends SimObject {

	public Abyss() {
		setDead(false);
		destroyable = false;
	}

	public Color getColor() {
		return Color.black;
	} //@nowarn Post // ESC/Java spec doesn't know that Color.green is not null.

	public void drawImage(Graphics g, int x, int y, int w, int h) {
		g.setColor(getColor());
		g.fillRect(x, y, w - 1, h - 1);
	}

	public void swallow(SimObject so) {
		//@ensures isInitialized
		synchronized (getGrid()) {
			if (so != null && !(so instanceof Block)) {
				TankSimulator.swallow.play();
				so.die();
			}
		}
	}

}