diff options
author | zedarider <ymherklotz@gmail.com> | 2016-11-06 20:28:39 +0000 |
---|---|---|
committer | zedarider <ymherklotz@gmail.com> | 2016-11-06 20:28:39 +0000 |
commit | f39a4463efa9deeaa6ec1f7986964f5baad784c2 (patch) | |
tree | 32be81647a2decb85c401ab84655caea01dcdffb /include/chess_ai.hpp | |
parent | 4428e477ae27e8634715610649b68919810dd684 (diff) | |
download | ChessAI-f39a4463efa9deeaa6ec1f7986964f5baad784c2.tar.gz ChessAI-f39a4463efa9deeaa6ec1f7986964f5baad784c2.zip |
constructor is now default
Diffstat (limited to 'include/chess_ai.hpp')
-rw-r--r-- | include/chess_ai.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/chess_ai.hpp b/include/chess_ai.hpp index c1496e3..524ddc8 100644 --- a/include/chess_ai.hpp +++ b/include/chess_ai.hpp @@ -113,7 +113,7 @@ namespace chess_ai { public: // Initialises the chess piece to an empty square on the board - chess_piece(); + chess_piece() : type(empty), colour(none), x(0), y(0) {} // Otherwise initialise the chess piece to a king or queen where the // location is alreay known @@ -153,6 +153,12 @@ namespace chess_ai { return *this; } + chess_piece operator++(int) { + chess_piece tmp(*this); + operator++(); + return tmp; + } + // return a printable version of the square std::string str(); |