From a5bc94a36fe37fb20eba61516da3b6b58208537b Mon Sep 17 00:00:00 2001 From: ymherklotz Date: Sat, 14 Jan 2017 14:17:26 +0000 Subject: added colour to pieces and comments --- src/chess_piece.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/chess_piece.cpp') diff --git a/src/chess_piece.cpp b/src/chess_piece.cpp index 8d4cb94..ee307e2 100644 --- a/src/chess_piece.cpp +++ b/src/chess_piece.cpp @@ -1,12 +1,22 @@ +/* + * + * author: Yann Herklotz + * username: ymherklotz + * email: ymherklotz@gmail.com + * + * ----------------------------------------------------------------------------- + * + * Chess Piece class implementation + * + */ + #include "chess_piece.hpp" using namespace ymhChessAI; -// Chess Piece Base class that all the pieces inherit from - -ChessPiece::ChessPiece() : m_x(0), m_y(0) { +ChessPiece::ChessPiece() : m_x(0), m_y(0), m_colour(Colour::White) { } -ChessPiece::ChessPiece(const int& x, const int& y) : m_x(x), m_y(y) { +ChessPiece::ChessPiece(const int& x, const int& y, const Colour& colour) : m_x(x), m_y(y), m_colour(colour) { } -- cgit