<< 02-Challenge Day | 04-Views and Modifiers >>
Stacks, Buttons, Images, Alerts, LinearGradient
Add an @State property to store the user’s score, modify it when they get an answer right or wrong, then display it in the alert and in the score label.
🔗 Solution
When someone chooses the wrong flag, tell them their mistake in your alert message – something like “Wrong! That’s the flag of France,” for example.
🔗 Solution
Make the game show only 8 questions, at which point they see a final alert judging their score and can restart the game.
🔗 Solution