You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
661 B
23 lines
661 B
import Foundation
|
|
|
|
class NewGameVM : ObservableObject {
|
|
@Published var rulesType: RulesType = .Classic
|
|
@Published var width: UInt = 7 { didSet { if width < 1 { width = 1 } } }
|
|
@Published var height: UInt = 7 { didSet { if height < 1 { height = 1 } } }
|
|
@Published var alignedTokens: UInt = 4 { didSet { if alignedTokens < 2 { alignedTokens = 2 } } }
|
|
}
|
|
|
|
// Didn't manage to nest player settings under NewGameVM
|
|
class PlayerSettingsVM : ObservableObject, Identifiable {
|
|
@Published var type: PlayerType
|
|
@Published var name: String = ""
|
|
|
|
init(type: PlayerType ) {
|
|
self.type = type
|
|
}
|
|
}
|
|
|
|
enum RulesType {
|
|
case Classic
|
|
}
|