WWDC24 SALE: Save 50% on all my Swift books and bundles! >>

Milestone: Project 4-6 basic logic

Forums > 100 Days of SwiftUI

Hi everyone, i have a problem with this milestone, i don't have any idea how to do this -> You should generate all your questions as soon as your game starts, storing them as an array of questions. Those questions should probably be their own Swift struct, Question, storing the text and the answer. Could you help me to start write this code?


Hey, sorry it took so long to get to this.

So a simple struct would have the first number, the second number, and the answer, all of which would be ints.

You can't really generate them until the user's picked the range of what they want a quiz on. So when they press that button, you'd generate the answers at that point.

If you look at projects 4-6, all the building blocks are there. I just don't want to give you too much of the answer as the struggle's what helps us remember later on.


Save 50% in my WWDC sale.

SAVE 50% To celebrate WWDC24, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.