我正在追逐圈子中的错误消息,试图弄清楚我如何得到我需要的工作.
我正在制作一个国际象棋游戏,每个西洋棋棋子都是一个类,并且有一个名为Piece的接口类.
Piece.h
class Piece {
public:
virtual ~Piece() {};
/*
* Verifies the move on a per-piece basis. If the move is valid, make the changes on the board and return true, false otherwise.
*
* @param b Reference to the board
* @param toLocation Where to move the piece
* @return bool If the move is valid
*/
virtual bool move(Board &b, std::pair<int, int> toLocation) { return false; }
protected:
Piece(GameData::Color _c) { c = _c; }
GameData::Color …Run Code Online (Sandbox Code Playgroud)