First of all, I just want to thank Chris and Team for a wonderful job on the free IOS training! I have finished the 29 day challenge and want to add an additional reset button that will reset that whole status of the game to its original state.
I am coming from a embedded C background, which in our case, just going back to main() to start all over again.
I tried to invoke the viewDidLoad again, but to to avail. Can you give some advice/recommendation on this?
Just want to get this over before moving forward with another build.
I added this inside the show alert after the game has ended. Timer is stuck at zero. What is the simplest way to call viewDidLoad again to reinitialize everything?
// Add a button for the user to dismiss
let okAction = UIAlertAction(title: "OK", style: .default, handler: { ACTION in
let model = CardModel()
self.deckOfCards = [Card]()
self.deckOfCards = model.getCards()
self.milliseconds = 60 * 1000
})