blob: 712c88eba4ab7fc2f640e4d0f56677683db75a62 (
plain)
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
|
#ifndef JEWL_H
#define JEWL_H
// Programmer: Brett Weiland
// Date: 4/30/23
// File: jewl.h
// Assignment: SP-B-finalProject
// Purpose: jewl gameObject. This class is what cops and robbers have in their inventory
// (although this doesn't have to be the case, as they're both templeted).
// if there were more types of inventory objects, i'd make this an abstract class.
#include "gameObject.h"
class jewl : public gameObject {
public:
//Desc: returns value of this
//Pre: valid gameObject location set
//Post: returns sum of coordinates
unsigned int value() const;
//Desc: attaches jewl to map, notifies city we are available
//Pre: valid coordinates are set
//Post: jewl attached to map, can be picked up by npc<jewl>
void drop();
//Desc: detaches jewl from map, notifies city we are no longer available
//Pre: none
//Post: jewl detached from map, can't be picked up until dropped
unsigned int pickup();
//overriden members, see respective base classes
char getIcon() const override; //gameObject.h
unsigned int get_drawPriority() const override; //gameObject.h
};
#endif
|