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

public abstract class Item extends SimObject{
//Overview: Item is a SimObject that UserTank can take and use it
//	to perform some special actions.
	protected String name;
	protected boolean permanent;
	
	public Item(String name){
		this.name = name;
		setDead(true);	//item don't need to execute itself.
	}
	public String getName(){
		return name;
	}
	abstract public void action(SimObject so);
	
	public void drawImage(Graphics g,int x, int y, int w, int h){
		g.setColor(Color.black);
		g.fillRect(x+1,y+1,w-4,h-4);
		g.setColor(Color.lightGray);
		g.fillRect(x+w/8+1,y+h/8+1,6*w/8-4,6*h/8-4);
		g.setColor(Color.red);
		g.drawString("?",x+w/8+1,y+h/2+2);
	}
}