Update on MatchApp Game

Hi,

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.

Thanks

Hi, good idea! I also wanted to add that button, Chris, how do we do it?

you can try to simply put an alert and have the values (all arrays “reset”)

model = CardModel()
cardArray = [ Card ] ()
cardArray = model.getCards()
seconds = 45

Where do you put this code?

depends, you can put it on the win check or if time is 0
also make sure to repeat/refresh the timer when you do it