aboutsummaryrefslogtreecommitdiffstats
path: root/src/chess_board.cpp
diff options
context:
space:
mode:
authorymherklotz <ymherklotz@gmail.com>2017-01-15 19:44:15 +0000
committerymherklotz <ymherklotz@gmail.com>2017-01-15 19:44:15 +0000
commit1f138d96ab7f517e7842710ef3428f67a2965877 (patch)
tree4070a934b4cf8d3040e48a50dc5e0991058fa136 /src/chess_board.cpp
parenta5bc94a36fe37fb20eba61516da3b6b58208537b (diff)
downloadChessAI-1f138d96ab7f517e7842710ef3428f67a2965877.tar.gz
ChessAI-1f138d96ab7f517e7842710ef3428f67a2965877.zip
creating the board
Diffstat (limited to 'src/chess_board.cpp')
-rw-r--r--src/chess_board.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/chess_board.cpp b/src/chess_board.cpp
new file mode 100644
index 0000000..30c8aff
--- /dev/null
+++ b/src/chess_board.cpp
@@ -0,0 +1,34 @@
+/*
+ *
+ * author: Yann Herklotz
+ * username: ymherklotz
+ * email: ymherklotz@gmail.com
+ * date created: 14/01/17
+ *
+ * -----------------------------------------------------------------------------
+ *
+ * Chess Board class implementation
+ *
+ */
+
+#include "chess_board.hpp"
+#include <iostream>
+using namespace ymhChessAI;
+
+
+ChessBoard::ChessBoard() {
+ board.reserve(CHESS_BOARD_SIZE);
+
+ for(auto&& piece : board)
+ piece = std::unique_ptr<ChessPiece>(new King);
+
+ // for(unsigned i = 0; i < CHESS_BOARD_SIZE; ++i)
+ // board.emplace_back(new King);
+}
+
+void ChessBoard::printBoard() {
+ for(auto&& piece : board) {
+ piece->move(1, 2);
+ std::cout << "Hello" << std::endl;
+ }
+}