31 lines
705 B
C++
31 lines
705 B
C++
//
|
|
// Created by hamac on 18.12.2024.
|
|
//
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class Chesspiece {
|
|
private:
|
|
/* fields */
|
|
char color;
|
|
char identifier;
|
|
std::string position;
|
|
std::vector<std::string> positions;
|
|
|
|
/* methods */
|
|
virtual std::vector<std::string> calcAvaibleMoves() {}
|
|
|
|
public:
|
|
std::string getPosition() { return this->position; };
|
|
void setPosition(std::string position) {
|
|
this->position = position;
|
|
calcAvaibleMoves();
|
|
}
|
|
|
|
char getColor() { return this->color; }
|
|
void setColor(char color) { this->color = color; }
|
|
|
|
std::vector<std::string> getPositions() { return this->positions; }
|
|
};
|