dev: Fixing compilation/linking errors, added other piece classes

This commit is contained in:
A.M. Rowsell 2025-08-04 21:45:23 -04:00
commit 2d83f43cfb
Signed by untrusted user who does not match committer: amr
GPG key ID: E0879EDBDB0CA7B1
4 changed files with 103 additions and 38 deletions

View file

@ -19,9 +19,7 @@ enum Players { PL_WHITE, PL_BLACK };
struct Square;
class Board {
private:
std::vector<std::vector<std::unique_ptr<Piece>>> boardGrid;
friend class Piece;
public:
Board();
virtual ~Board();
@ -32,6 +30,9 @@ public:
bool isEmpty(Square square) const;
uint64_t serialBoard = 0xFFFF00000000FFFF; // opening position
void deserializeBoard(uint64_t incomingBoard);
// this should be protected, but even when Piece is declared as a friend,
// accessing it in Piece.cpp threw an error
std::vector<std::vector<std::unique_ptr<Piece>>> boardGrid;
};
#endif // BOARD_HPP