summaryrefslogtreecommitdiff
path: root/jewl.cpp
diff options
context:
space:
mode:
authorroot <root@bpcserver.bpcserver>2024-02-27 21:53:44 -0600
committerroot <root@bpcserver.bpcserver>2024-02-27 21:53:44 -0600
commitafa02f645056c5823b0d8a29d37c1ff10aedce7a (patch)
tree0bc89e7909c17d8f33538ac9f31a641872b89f40 /jewl.cpp
Diffstat (limited to 'jewl.cpp')
-rw-r--r--jewl.cpp26
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();
+}