summaryrefslogtreecommitdiff
path: root/src/mob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mob.cpp')
-rw-r--r--src/mob.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/mob.cpp b/src/mob.cpp
new file mode 100644
index 0000000..0da7b34
--- /dev/null
+++ b/src/mob.cpp
@@ -0,0 +1,43 @@
+/*
+ * =====================================================================================
+ *
+ * Filename: mob.cpp
+ *
+ * Description: Implements a mobile entity
+ *
+ * Version: 1.0
+ * Created: 01/07/2023 10:02:44 PM
+ * Revision: none
+ * Compiler: gcc
+ *
+ * Author: Cara Salter (muirrum), cara@devcara.com
+ * Organization:
+ *
+ * =====================================================================================
+ */
+#include <stdlib.h>
+#include <ncurses.h>
+#include "mob.hpp"
+
+Mob::Mob(char symbol, int row_0, int col_0) {
+ _symbol = symbol;
+ _row = row_0;
+ _col = col_0;
+}
+
+void Mob::move(int row_0, int col_0) {
+ _row = row_0;
+ _col = col_0;
+}
+
+int Mob::row() {
+ return _row;
+}
+
+int Mob::col() {
+ return _col;
+}
+
+char Mob::symbol() {
+ return _symbol;
+}