diff options
author | tom <tom@ground-control> | 2015-11-19 17:38:17 -0600 |
---|---|---|
committer | tom <tom@ground-control> | 2015-11-19 17:38:17 -0600 |
commit | b4bf156884f71bec9fa526e80e1d1db43e7650b2 (patch) | |
tree | 0970f27373408474cf7979c40e2ee4574fb38e3d /src/Character.cpp | |
parent | ba71810fab85da23ec8501af6d5d4935458b595e (diff) |
line of guys now appears near middle of map
Diffstat (limited to 'src/Character.cpp')
-rw-r--r-- | src/Character.cpp | 9 |
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; |