-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontainer.h
44 lines (33 loc) · 1020 Bytes
/
container.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef DA_GAME_CONTAINER_H
#define DA_GAME_CONTAINER_H
#include <vector>
#include "object.h"
namespace da_game {
class Container : public Object {
protected:
int hold_weight;
int hold_volume;
std::vector<Object *> * objects;
public:
/*
* Weight before container breaks
*/
virtual int get_hold_weight() const = 0;
/*
* Volume capacity of container
*/
virtual int get_hold_volume() const = 0;
virtual int get_weight_left() const;
virtual int get_volume_left() const;
/*
* Add an object to this container
*/
virtual bool add(Object &) = 0;
/*
* Remove an object from this container
*/
virtual bool remove(Object &) = 0;
virtual std::vector<Object *> * get_objects();
};
}
#endif // DA_GAME_CONTAINER_H