Figure.h 545 B

12345678910111213141516171819202122232425
  1. #ifndef _FIGURE_H
  2. #define _FIGURE_H
  3. #include "Position.h"
  4. #include <utility>
  5. using namespace std;
  6. class Figure
  7. {
  8. protected:
  9. Position position;
  10. char color;
  11. public:
  12. // Получить возможные движения фигуры на доске
  13. // вернёт moves_count - количество возможных ходов
  14. // и список из char[2] - сами ходы (вида A5, B3 и т.п.)
  15. virtual std::pair<int, Position*> get_moves() = 0;
  16. virtual const char* print() = 0;
  17. };
  18. #endif