diff options
author | zedarider <ymherklotz@gmail.com> | 2017-01-17 15:42:18 +0000 |
---|---|---|
committer | zedarider <ymherklotz@gmail.com> | 2017-01-17 15:42:18 +0000 |
commit | f0799aef3ff8c4a8e8ffea79c963b8f128c462b9 (patch) | |
tree | ef496e7326148dd29d555eb017155fcb7af234f8 /src/chess_board.cpp | |
parent | 088b948122cbf24dd9dc1dfedf4be2724bab2157 (diff) | |
download | ChessAI-f0799aef3ff8c4a8e8ffea79c963b8f128c462b9.tar.gz ChessAI-f0799aef3ff8c4a8e8ffea79c963b8f128c462b9.zip |
fixed the chess board and added empty pieces to fill holes, also added forward declarations
Diffstat (limited to 'src/chess_board.cpp')
-rw-r--r-- | src/chess_board.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/chess_board.cpp b/src/chess_board.cpp index 1eaa7d4..3432b52 100644 --- a/src/chess_board.cpp +++ b/src/chess_board.cpp @@ -18,6 +18,13 @@ using namespace ymhChessAI; ChessBoard::ChessBoard() { + for(unsigned i = 0; i < BOARD_SIZE; ++i) + board.emplace_back(new EmptyPiece); +} + +void ChessBoard::populateBoard() { + for(auto&& piece : board) + piece = chessPiecePtr(new Knight); } void ChessBoard::printBoard() { |