         public init(board: Board = Board(),
                     playerTurn: PlayerTurn = .White,
                     castlingAvailability: CastlingAvailability = .all,
-                    enPassantTarget: Location? = nil,
+                    enPassantTarget: Square? = nil,
                     halfmoves: UInt = 0,
                     fullmoves: UInt = 1) {
             self.board = board

        public var castlingAvailability: CastlingAvailability

        /// The en passant target location.
        public var enPassantTarget: Location?

        /// The halfmove number.
        public var halfmoves: UInt

        public func fen() -> String {
            return board.fen()
                + " \(playerTurn.isWhite ? "w" : "b") \(castlingAvailability) "
                + (enPassantTarget.map({ "\($0)".lowercaseString }) ?? "-")
                + " \(halfmoves) \(fullmoves)"
        }

