From afa02f645056c5823b0d8a29d37c1ff10aedce7a Mon Sep 17 00:00:00 2001 From: root Date: Tue, 27 Feb 2024 21:53:44 -0600 Subject: init --- jewl.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 jewl.h (limited to 'jewl.h') diff --git a/jewl.h b/jewl.h new file mode 100644 index 0000000..712c88e --- /dev/null +++ b/jewl.h @@ -0,0 +1,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 + 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 -- cgit v1.2.3