chessmcu/Board.cpp

56 lines
No EOL
1.2 KiB
C++

/*
* File: Board.cpp
* Author: amr
*
* Created on July 30, 2025, 9:20 PM
*/
#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);
switch(i) {
case 0:
// white back rank
break;
case 1:
// white pawn rank
break;
case 2:
case 3:
case 4:
case 5:
//empty squares
for(int j = 0; j <= 8; j++) {
boardGrid[i][j] = std::make_unique<Piece>(PIECE_EMPTY);
}
break;
case 6:
// black pawn rank
break;
case 7:
// black back rank
default:
break;
}
}
}
Board::~Board() {
}
void Board::setupInitialPosition() {
return;
}
void Board::movePiece(Square from, Square to) {
return;
}
void Board::deserializeBoard(uint64_t incomingBoard) {
return;
}