dev: hardware init code added. starting to write Board methods

This commit is contained in:
A.M. Rowsell 2025-08-02 13:32:16 -04:00
commit d6eb6b69c2
Signed by untrusted user who does not match committer: amr
GPG key ID: E0879EDBDB0CA7B1
4 changed files with 135 additions and 34 deletions

View file

@ -8,15 +8,25 @@
#include "Board.hpp"
Board::Board() {
// set up the board grid with smart pointers
// initialize each square with a Piece, set to PIECE_EMPTY
boardGrid.resize(8);
for(int i = 0; i < 8; i++) {
boardGrid[i].resize(8);
for(int j = 0; j < 8; j++) {
boardGrid[i][j] = std::make_unique<Piece>(PIECE_EMPTY);
}
}
}
Board::~Board() {
}
void Board::setupInitialPosition() {
return;
}
void Board::movePiece(int fromX, int fromY, int toX, int toY) {
void Board::movePiece(Square from, Square to) {
return;
}