dev: Fixing compilation/linking errors, added other piece classes
This commit is contained in:
parent
ea62d03680
commit
2d83f43cfb
4 changed files with 103 additions and 38 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue