Mercurial > public > geoquiz
view GeoQuiz/ViewModels/ContentView-ViewModel.swift @ 26:425078c01194
refactor code
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Wed, 09 Nov 2022 10:30:01 +0100 |
parents | |
children |
line wrap: on
line source
// // ContentView-ViewModel.swift // GeoQuiz // // Created by Dennis Concepción Martín on 7/11/22. // import Foundation extension ContentView { @MainActor class ViewModel: ObservableObject { @Published var path: [GameType] = [] @Published var showingBuyPremiumModalView = false @Published var showingSettingsModalView = false @Published var showingProfileModalView = false let premiumGames: [GameType] = [.guessTheCapital, .guessTheCountry, .guessThePopulation] func go(to gameType: GameType) { path.append(gameType) } } }