Added Enigma game

This commit is contained in:
pelya
2010-10-13 17:30:44 +03:00
parent 8bd2d39dfe
commit bf7d3f22c6
308 changed files with 92986 additions and 39 deletions

View File

@@ -0,0 +1,29 @@
#ifndef ITEMHOLDER_HH_INCLUDED
#define ITEMHOLDER_HH_INCLUDED
#include "items.hh"
namespace enigma
{
/**
* A base class for all entities that can hold multiple items
* during the game. Currently this is only the inventory that is
* displayed at the bottom of the screen (there is one inventory
* for every player) and the it-bag item.
*/
class ItemHolder {
public:
virtual ~ItemHolder() {}
//! Return true if not further object can be picked up
virtual bool is_full() const = 0;
virtual bool is_empty() const = 0;
//! Add another item
virtual void add_item (world::Item *it) = 0;
virtual world::Item *yield_first() = 0;
virtual void takeItemsFrom(ItemHolder *ih) {return;}
};
}
#endif