/***

  Object class

***/

#ifndef _OBJECT_H_
#define _OBJECT_H_

#include "DisplayInterface.h"
#include "Globals.h"
#include "World.h"

class World;

class Object {
public:

	// constructor
	Object( int _actingspeed ) { actingspeed = _actingspeed; }

	// returns object identity
	virtual int identify( ) = 0;

	// takes a turn to act in the world
	// returns false if the game should end
	virtual bool act( DisplayInterface &d, World *w, int x, int y, int time ) = 0;

	// disappears from the world
	virtual void die( DisplayInterface &d, World *w, int x, int y ) = 0;

	// shows the object at its spot in the world
	virtual void show( DisplayInterface &d, World *w, int x, int y ) = 0;

protected:

	int actingspeed; // speed of object, acts when speed mod time is zero

};

#endif
