Alice Community

Alice Community (
-   Works-In-Progress (
-   -   Need Help Bowling (

mandapanda625 07-03-2020 01:16 PM

Need Help Bowling
1 Attachment(s)
I am having issues randomizing my pins falling and randomizing the bowling game for my term project. I'm not exactly sure how to execute it. There needs to be a winning and losing aspect as well. any help is appreciated!

djslater107 07-04-2020 02:13 PM

Randomize Bowling Pins Falling
Use the [B]For All In Order[/B] control structure with your array of pins.

Also, you will need a count variable of how many pins fall, and use that count to help determine whether you win or lose

Inside the [B]For All In Order[/B] - for each pin
[LI] if (choose true <probability of true> of the time) - from the World functions tab[/LI][LIST]
[LI]pin fall(set duration to very small number so it looks like they are happening together)[/LI]
[LI] increase count by 1[/LI][/LIST][LI] Look at count value to determine win or lose[/LIST]
Hope this helps.

Don Slater
Alice Project

All times are GMT -5. The time now is 10:47 AM.

Copyright ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.