Help with my project (begginer here)

Hey i’m a new coder and i would apreciate some help with a question i have on a project I’m making it’s hard to explain but I’ll try

Think it like a game with 30 cops and you have to chose 5 cops. in onde day of the game the amount of bullets and images of the cops should change and then in the end of the day i want to show the progress they did alone and togheter but I don’t know which cop The user decided to use. so do i have to create a full class for each cop or there’s other way. Thanks for the help

hello, based on what you said you far you will need to create a model called “cop” where the attributes could be name, bullets

then you will need to create something similar to the match app where you generate multiple cops with different values of bullets (and names)

you will then probably need some sort of random logic to make it determine who dies or whatever you want them to do, you can probably use

random https://codewithchris.com/swift-random-number/

and timers to make it seem like the game is progressing step by step

good luck :slight_smile:

Thanks but there’s a problem the number of bullets fired would not be random like one cop that have a better aim would lose one bullet and other would lose 2 and it would have some sort of shop to buy the bullets with in game money this way changing every time the number of bullets so in that way I don’t know how to keep track of just the 5 cops the person choose without having to create a whole class for each one

im not really sure how i can help you further you but i think timers and random should help you with your goal.