dev: hardware init code added. starting to write Board methods
This commit is contained in:
parent
25c351be04
commit
d6eb6b69c2
4 changed files with 135 additions and 34 deletions
12
Board.cpp
12
Board.cpp
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue