Oh No!Wrong Bus!
My list ‘all persons' is used to store the generated villains. Because the number of generated people is random, I need to use a unified method to turn everyone into a whole.
I use a loop to generate two random sets of a specific number of person objects, and add each newly created Person to the 'allPersons' list.
In the logic of person leaving the bus, I also used a loop to select a random number of person objects.
Download
Download
Oh No!Wrong Bus! by wzhao4 - Google Chrome 2024-02-18 20-39-43.mp4 6.7 MB
Leave a comment
Log in with itch.io to leave a comment.