summaryrefslogtreecommitdiff
path: root/src/Character.cpp
diff options
context:
space:
mode:
authortom <tom@ground-control>2015-11-19 17:38:17 -0600
committertom <tom@ground-control>2015-11-19 17:38:17 -0600
commitb4bf156884f71bec9fa526e80e1d1db43e7650b2 (patch)
tree0970f27373408474cf7979c40e2ee4574fb38e3d /src/Character.cpp
parentba71810fab85da23ec8501af6d5d4935458b595e (diff)
line of guys now appears near middle of map
Diffstat (limited to 'src/Character.cpp')
-rw-r--r--src/Character.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Character.cpp b/src/Character.cpp
index 71a47bb..7f12035 100644
--- a/src/Character.cpp
+++ b/src/Character.cpp
@@ -1,10 +1,11 @@
#include "Character.hpp"
-Character::Character(char nSymbol, int nRow, int nCol)
+Character::Character(char nSymbol, int nColor, int nRow, int nCol)
{
symbol = nSymbol;
row = nRow;
col = nCol;
+ color = nColor;
}
void Character::move(int nRow, int nCol)
@@ -13,6 +14,12 @@ void Character::move(int nRow, int nCol)
col = nCol;
}
+void Character::draw(WINDOW * w)
+{
+ wattron(w,COLOR_PAIR(color));
+ mvwaddch(w,row,col,symbol);
+}
+
int Character::getRow()
{
return row;