summaryrefslogtreecommitdiff
path: root/src/Character.cpp
blob: 7f12035d778518eb3b631aecf3f79b8b43c9f0fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "Character.hpp"

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)
{
    row = nRow;
    col = nCol;
}

void Character::draw(WINDOW * w)
{
    wattron(w,COLOR_PAIR(color));
    mvwaddch(w,row,col,symbol);
}

int Character::getRow()
{
    return row;
}

int Character::getCol()
{
    return col;
}

char Character::getSymbol()
{
    return symbol;
}