Chessboard.h 621 B

1234567891011121314151617181920212223242526272829303132
  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. Chessboard copy();
  20. Cell get_cell(Position pos);
  21. Cell get_icell(int index, int jindex);
  22. friend std::ostream& operator <<(std::ostream& out, Chessboard& chess);
  23. };
  24. #endif