                 board[g1] == nil &&
                 board[h1] == WR
             {
-                result.append(.castleKingside(player: player))
+                moves.append(.castleKingside(player: player))
             }
 
             if whiteCanCastleQueenside &&

    private static let pieceKindsWithRookVectors: [PieceKind]
        = [.rook, .queen]

    private func rookMoves(piece: Piece, location: Location) -> [Move] {
        return slideMoves(piece: piece,
                          location: location,
                          vectors: Position.rookVectors)
    }

    // MARK:- Bishop

        }
    }

    private func addPawnMoves(piece: Piece, location: Location,
                              to moves: inout [Move]) {
        let player = piece.player
        let file = location.file
        let rank = location.rank

        if Board.minRank < rank && rank < Board.maxRank {
            let promotionRank = Position.pawnPromotionRank(player: player)
