#include "RealPlayer.h" #include "Position.h" #include #include #include std::pair RealPlayer::get_move(Chessboard board, char color) { char pos1[2]; char pos2[2]; std::cout << "Please enter your move: "; std::cin >> pos1; std::cin >> pos2; if (board.get_cell(Position(pos1[0], pos1[1])).get_figure() == nullptr or board.get_cell(Position(pos1[0], pos1[1])).get_figure()->get_color() != color ) throw std::invalid_argument("Player Plays Against the Rules"); return std::pair(Position(pos1[0], pos1[1]), Position(pos1[2], pos1[3])); }