public override void Undo() { if (executed) { TargetTile.DetachPiece(); SelectedTile.AttachPiece(Piece, PieceHasMoved); executed = false; } }
public override void Undo() { if (executed) { TargetTile.DetachPiece(); SelectedTile.AttachPiece(Piece, PieceHasMoved); if (Piece is IEnPassantable) { IEnPassantable enPassantablePiece = Piece as IEnPassantable; enPassantablePiece.CurrentlyEnPassantable = false; } executed = false; } }