diff options
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; |