// © 2025 A.M. Rowsell // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. // This Source Code Form is "Incompatible With Secondary Licenses", as // defined by the Mozilla Public License, v. 2.0. #ifndef BOARD_HPP #define BOARD_HPP #include #include #include #include "Piece.hpp" // why do I have to forward declare all these?! class Piece; enum Players { PL_WHITE, PL_BLACK }; struct Square; class Board { private: friend class Piece; Players playerTurn; public: // this should be protected, but even when Piece is declared as a friend, // accessing it in Piece.cpp threw an error std::vector>> boardGrid; Board(); virtual ~Board(); void setupInitialPosition(); Piece *getPieceAt(Square square); void movePiece(Square from, Square to); bool isInBounds(Square square) const; bool isEmpty(Square square) const; uint64_t serialBoard = 0xFFFF00000000FFFF; // opening position void deserializeBoard(uint64_t incomingBoard); }; #endif // BOARD_HPP