diff options
Diffstat (limited to 'jewl.cpp')
-rw-r--r-- | jewl.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/jewl.cpp b/jewl.cpp new file mode 100644 index 0000000..1be4d22 --- /dev/null +++ b/jewl.cpp @@ -0,0 +1,26 @@ +#include "jewl.h" +#include "coordinate.h" +#include "city.h" + +// Programmer: Brett Weiland +// Date: 4/30/23 +// File: jewl.hpp +// Assignment: SP-B-finalProject +// Purpose: contains member functions for jewl; see jewl.h + +char jewl::getIcon() const { return 'j'; } + +unsigned int jewl::get_drawPriority() const { return 2; } + +unsigned int jewl::value() const { return location.get_x() + location.get_y(); } + +void jewl::drop() { + mapAttach(); + parentCity->markJewlAvailable(*this); +} + +unsigned int jewl::pickup() { + mapDetach(); + parentCity->markJewlTaken(*this); + return value(); +} |