/* * piece.cpp * * */ #include "piece.h" Piece::Piece(string name_p, int row_p, int col_p, int w_p, int h_p, char dir_p) : name(name_p), row(row_p), col(col_p), w(w_p), h(h_p), dir(dir_p) { } string Piece::getName(void) { return name; } int Piece::getRow(void) { return row; } int Piece::getCol(void) { return col; } int Piece::getW(void) { return w; } int Piece::getH(void) { return h; } char Piece::getDir(void) { return dir; } /* mark the current position of the piece */ void Piece::markPos(void) { POINT curr = { row, col }; haveBeen.push_back(curr); } vector *Piece::gethaveBeen(void) { return &haveBeen; } void Piece::setRow(int row_p) { row = row_p; } void Piece::setCol(int col_p) { col = col_p; }