Figure.h 554 B

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