Handicap

public struct Handicap

Model class that groups a number of CapableFeatures to represent a user’s handicap.

  • A list of CapableFeatures that are expected to be enabled if a user has this handicap.

    Declaration

    Swift

    public private(set) var features: [CapableFeature]
  • The name of the Handicap that can be used to uniquely identify the Handicap. This name is also used inside the status map.

    Declaration

    Swift

    public private(set) var name: String
  • This mode defines whether all features need to be enabled to set the Handicap‘s status to enabled or only one of them.

    Declaration

    Swift

    public private(set) var enabledIf: HandicapEnabledMode
  • Initializes a new Handicap object.

    • features: A list of features that are expected to be enabled if a user has this handicap.
    • name: The name of the Handicap that can be used to uniquely identify the Handicap. This name is also used inside the status map.
    • enabledIf: This mode defines whether all features need to be enabled to set the Handicap‘s status to enabled or only one of them.

    Declaration

    Swift

    public init(with features: [CapableFeature], name: String, enabledIf: HandicapEnabledMode)
  • Declaration

    Swift

    public static func == (lhs: Handicap, rhs: Handicap) -> Bool