From b4bf156884f71bec9fa526e80e1d1db43e7650b2 Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 19 Nov 2015 17:38:17 -0600 Subject: line of guys now appears near middle of map --- src/Character.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/Character.cpp') 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; -- cgit v1.2.3