Handicap
public struct Handicap
Model class that groups a number of CapableFeature
s to represent a user’s handicap.
-
A list of
CapableFeature
s 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 theHandicap
. 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 theHandicap
. 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)