dev: Continue to write the chess logic, working through it bit by bit

This commit is contained in:
A.M. Rowsell 2025-08-03 13:11:30 -04:00
commit ba64e2bcf3
Signed by untrusted user who does not match committer: amr
GPG key ID: E0879EDBDB0CA7B1
4 changed files with 96 additions and 15 deletions

View file

@ -13,8 +13,29 @@ Board::Board() {
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);
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;
}
}
}