Chessboard.h 598 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _CHESSBOARD_H
  2. #define _CHESSBOARD_H
  3. #include <vector>
  4. #include "Figure.h"
  5. #include "Position.h"
  6. #include "Cell.h"
  7. #include <utility>
  8. #include <iostream>
  9. class Chessboard
  10. {
  11. private:
  12. Cell** board;
  13. vector<std::pair<Position, Position>> moves;
  14. vector<Position> get_possible_moves(Figure* fig);
  15. public:
  16. Chessboard();
  17. Chessboard(vector<Figure*>);
  18. void create_move(Position pos1, Position pos2);
  19. Cell get_cell(Position pos);
  20. Cell get_icell(int index, int jindex);
  21. friend std::ostream& operator <<(std::ostream& out, Chessboard& chess);
  22. };
  23. #endif