#ifndef SPRITE_H
#define SPRITE_H

#include <string>
#include <curses.h>

class sprite {
  public:
	sprite();
	~sprite();
	virtual chtype mychar() const;
	virtual char mysavechar() const;
	virtual int mycol() const;
	virtual std::string mytype() const;
	virtual void setchar(chtype c);
	virtual void setsavechar(char c);
	virtual void setcol(int c);
	virtual int setpos(int x, int y);

	// when something pushes on a block, and it is found that there is
	// something at the end of the line of blocks, if it is a sprite,
	// this method will be called, and the object itself will check what
	// is in the direction dir and decide itself wether it will be
	// squished. ie, super beast returns nonzero if there is a wall in
	// <dir> and if explosive walls is set.
	virtual int squish(int dir);
	
  protected:
	void settype(std::string t);
	chtype _mychar;
	
	// a different savechar in the event you save a map and you want the
	// chars in the file to be different from what actually gets
	// displayed on the screen, I actually used this more for the life
	// program
	char _mysavechar;
	int _mycol;
	std::string _mytype;
};
#endif
