diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/chess_board.hpp | 42 | ||||
-rw-r--r-- | include/chess_piece.hpp | 19 |
2 files changed, 59 insertions, 2 deletions
diff --git a/include/chess_board.hpp b/include/chess_board.hpp new file mode 100644 index 0000000..fef1f69 --- /dev/null +++ b/include/chess_board.hpp @@ -0,0 +1,42 @@ +/* + * + * author: Yann Herklotz + * username: ymherklotz + * email: ymherklotz@gmail.com + * date created: 14/01/17 + * + * ----------------------------------------------------------------------------- + * + * Chess Board class that will have all the chess pieces on it + * + */ + +#ifndef YMH_CHESS_BOARD_HPP +#define YMH_CHESS_BOARD_HPP + +#include "chess_piece.hpp" + +#include <vector> +#include <memory> + +namespace ymhChessAI { +typedef std::vector<std::unique_ptr<ChessPiece> >::iterator boardIterator; +typedef std::vector<std::unique_ptr<ChessPiece> > boardVector; +typedef std::unique_ptr<ChessPiece> chessPiecePtr; + +class ChessBoard { +public: + ChessBoard(); + ChessBoard(const ChessBoard& other) = default; + virtual ~ChessBoard() = default; + + void printBoard(); +protected: +private: + static const unsigned CHESS_BOARD_SIZE = 64; + + boardVector board; +}; +} + +#endif diff --git a/include/chess_piece.hpp b/include/chess_piece.hpp index 60b6fe5..ce6ca5c 100644 --- a/include/chess_piece.hpp +++ b/include/chess_piece.hpp @@ -3,6 +3,7 @@ * author: Yann Herklotz * username: ymherklotz * email: ymherklotz@gmail.com + * date created: 13/01/17 * * ----------------------------------------------------------------------------- * @@ -54,7 +55,7 @@ protected: }; -// King class that provides the class for the king +// King class class King : public ChessPiece { public: @@ -68,6 +69,9 @@ protected: private: }; + +// Queen class + class Queen : public ChessPiece { public: Queen(); @@ -80,6 +84,9 @@ protected: private: }; + +// Rook class + class Rook : public ChessPiece { public: Rook(); @@ -93,6 +100,8 @@ private: }; +// Bishop class + class Bishop : public ChessPiece { public: Bishop(); @@ -105,6 +114,9 @@ protected: private: }; + +// Knight class + class Knight : public ChessPiece { public: Knight(); @@ -117,6 +129,9 @@ protected: private: }; + +// Pawn class + class Pawn : public ChessPiece { public: Pawn(); @@ -128,6 +143,6 @@ public: protected: private: }; -}; +} #endif |