|
@@ -81,6 +81,7 @@ struct chessy::Move
|
|
|
PieceType promotion;
|
|
|
|
|
|
bool isCastling;
|
|
|
+ bool isEnPassant;
|
|
|
|
|
|
|
|
|
Move (void) = default;
|
|
@@ -91,7 +92,8 @@ struct chessy::Move
|
|
|
Move& operator= (Move&&) = default;
|
|
|
|
|
|
inline Move(const std::string& move) :
|
|
|
- promotion{ PieceType::PAWN }, isCastling{ false }
|
|
|
+ promotion{ PieceType::PAWN }, isCastling{ false },
|
|
|
+ isEnPassant{ false }
|
|
|
{
|
|
|
if (move.length() < 4)
|
|
|
return;
|
|
@@ -109,7 +111,8 @@ struct chessy::Move
|
|
|
|
|
|
inline Move(Index origin, Index destination) :
|
|
|
origin{ origin }, destination{ destination },
|
|
|
- promotion{ PieceType::PAWN }, isCastling{ false } {}
|
|
|
+ promotion{ PieceType::PAWN }, isCastling{ false },
|
|
|
+ isEnPassant{ false } {}
|
|
|
|
|
|
inline Move(Index origin, Index destination, PieceType promotion) :
|
|
|
origin{ origin }, destination{ destination }, promotion{ promotion },
|
|
@@ -117,7 +120,13 @@ struct chessy::Move
|
|
|
|
|
|
inline Move(Index origin, Index destination, bool isCastling) :
|
|
|
origin{ origin }, destination{ destination },
|
|
|
- promotion{ PieceType::PAWN }, isCastling{ isCastling } {}
|
|
|
+ promotion{ PieceType::PAWN }, isCastling{ isCastling },
|
|
|
+ isEnPassant{ false } {}
|
|
|
+
|
|
|
+ inline Move(Index origin, Index destination, bool isCastling, bool isEnPassant) :
|
|
|
+ origin{ origin }, destination{ destination },
|
|
|
+ promotion{ PieceType::PAWN }, isCastling{ isCastling },
|
|
|
+ isEnPassant{ isEnPassant } {}
|
|
|
|
|
|
inline std::string asString(void) const
|
|
|
{
|