 
     /// The target move location for an en passant.
     public var enPassantTarget: Square? {
-        guard let (move, piece, _, _, _) = _moveHistory.last where piece.kind.isPawn else {
+        guard let (move, piece, _, _, _, _) = _moveHistory.last where piece.kind.isPawn else {
             return nil
         }
         guard abs(move.rankChange) == 2 else {

        playerTurn.invert()
        attackersToKing = attackers
        self.halfmoves = halfmoves
        return move
    }



    /// Undoes the previous move and returns it, if any.
    private func _undoMove() -> Move? {
        guard let (move, piece, capture, attackers, halfmoves, rights) = _moveHistory.popLast() else {
            return nil
        }
        var captureSquare = move.end
