|
@@ -83,6 +83,8 @@ struct chessy::Move
|
|
//! it is indicated, that no promotion happened.
|
|
//! it is indicated, that no promotion happened.
|
|
PieceType promotion;
|
|
PieceType promotion;
|
|
|
|
|
|
|
|
+ bool isCastling;
|
|
|
|
+
|
|
|
|
|
|
Move (void) = default;
|
|
Move (void) = default;
|
|
Move (const Move&) = default;
|
|
Move (const Move&) = default;
|
|
@@ -92,7 +94,7 @@ struct chessy::Move
|
|
Move& operator= (Move&&) = default;
|
|
Move& operator= (Move&&) = default;
|
|
|
|
|
|
inline Move(const std::string& move) :
|
|
inline Move(const std::string& move) :
|
|
- promotion{ PieceType::PAWN }
|
|
|
|
|
|
+ promotion{ PieceType::PAWN }, isCastling{ false }
|
|
{
|
|
{
|
|
if (move.length() < 4)
|
|
if (move.length() < 4)
|
|
return;
|
|
return;
|
|
@@ -110,10 +112,16 @@ struct chessy::Move
|
|
|
|
|
|
inline Move(Index origin, Index destination) :
|
|
inline Move(Index origin, Index destination) :
|
|
origin{ origin }, destination{ destination },
|
|
origin{ origin }, destination{ destination },
|
|
- promotion{ PieceType::PAWN } {}
|
|
|
|
|
|
+ promotion{ PieceType::PAWN }, isCastling{ false } {}
|
|
|
|
|
|
inline Move(Index origin, Index destination, PieceType promotion) :
|
|
inline Move(Index origin, Index destination, PieceType promotion) :
|
|
- origin{ origin }, destination{ destination }, promotion{ promotion } {}
|
|
|
|
|
|
+ origin{ origin }, destination{ destination }, promotion{ promotion },
|
|
|
|
+ isCastling{ false } {}
|
|
|
|
+
|
|
|
|
+ inline Move(Index origin, Index destination, PieceType promotion,
|
|
|
|
+ bool isCastling) :
|
|
|
|
+ origin{ origin }, destination{ destination }, promotion{ promotion },
|
|
|
|
+ isCastling{ isCastling } {}
|
|
|
|
|
|
inline std::string asString(void) const
|
|
inline std::string asString(void) const
|
|
{
|
|
{
|