26
|
1 //
|
|
2 // ContentView-ViewModel.swift
|
|
3 // GeoQuiz
|
|
4 //
|
|
5 // Created by Dennis Concepción Martín on 7/11/22.
|
|
6 //
|
|
7
|
|
8 import Foundation
|
|
9
|
|
10 extension ContentView {
|
|
11 @MainActor class ViewModel: ObservableObject {
|
|
12 @Published var path: [GameType] = []
|
|
13 @Published var showingBuyPremiumModalView = false
|
|
14 @Published var showingSettingsModalView = false
|
|
15 @Published var showingProfileModalView = false
|
|
16
|
|
17 let premiumGames: [GameType] = [.guessTheCapital, .guessTheCountry, .guessThePopulation]
|
|
18
|
|
19 func go(to gameType: GameType) {
|
|
20 path.append(gameType)
|
|
21 }
|
|
22 }
|
|
23 }
|