From 98f4a31e1a359a69dbcc0fa4055f36cefb6d4e02 Mon Sep 17 00:00:00 2001 From: totycro Date: Mon, 11 Apr 2011 12:09:04 +0200 Subject: Added basic game logic --- pacman-c++/gameentity.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pacman-c++/gameentity.h (limited to 'pacman-c++/gameentity.h') diff --git a/pacman-c++/gameentity.h b/pacman-c++/gameentity.h new file mode 100644 index 0000000..82df438 --- /dev/null +++ b/pacman-c++/gameentity.h @@ -0,0 +1,19 @@ +#ifndef GAMEENTITY_H +#define GAMEENTITY_H + +class Actor; + +/** + * Abstract base class for entities that interact in the game + */ +class GameEntity { + + // returns whether the actor may enter this field + virtual bool checkEnter(Actor *actor) = 0; + + // performs action when this actor acctually enters + virtual void enter(Actor *actor) = 0; + +}; + +#endif // GAMEENTITY_H -- cgit v1.2.3