summaryrefslogtreecommitdiff
path: root/src/Character.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Character.cpp')
-rw-r--r--src/Character.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Character.cpp b/src/Character.cpp
new file mode 100644
index 0000000..71a47bb
--- /dev/null
+++ b/src/Character.cpp
@@ -0,0 +1,29 @@
+#include "Character.hpp"
+
+Character::Character(char nSymbol, int nRow, int nCol)
+{
+ symbol = nSymbol;
+ row = nRow;
+ col = nCol;
+}
+
+void Character::move(int nRow, int nCol)
+{
+ row = nRow;
+ col = nCol;
+}
+
+int Character::getRow()
+{
+ return row;
+}
+
+int Character::getCol()
+{
+ return col;
+}
+
+char Character::getSymbol()
+{
+ return symbol;
+}