// // SelectColor.swift // Yahtzee // // Created by Guy Lapalme on 2023-08-08. // import SwiftUI class SelectColor:ObservableObject { @Published var color:Color = .yellow let colorChoices:[Color] = [.yellow,.teal,.pink,.green,.orange] var current = 0 func nextColor(){ current = (current+1)%colorChoices.count color = colorChoices[current] } }