12345678910111213141516171819202122232425262728293031 |
- #ifndef _FIGURE_H
- #define _FIGURE_H
- #include "Position.h"
- #include <utility>
- #include <vector>
- using namespace std;
- class Figure
- {
- protected:
- Position position;
- char color;
- public:
- // Получить возможные движения фигуры на доске
- // вернёт moves_count - количество возможных ходов
- // и список из char[2] - сами ходы (вида A5, B3 и т.п.)
- virtual vector<Position> get_moves() = 0;
- virtual Figure* copy() = 0;
- virtual const char* print() = 0;
- Position get_position(){return position;}
- void set_position(Position pos){position = pos;}
- char get_color(){return color;}
- };
- #endif
|