Math problem
Dues
Member Posts: 1,159
Hey guys!
I could use some help with a calculation, since i totally suck at math
Think asteriods for the big picture.
If my spaceship has three different kinds of ammo which is randomly loaded for me to fire, and I have six enemies in my level that is randomly genereted but only gets destroyed when hit with the right ammo. How do I calculate how many rounds of ammo I need (in total) to start with to be sure I can take all enemies out?
Comments
If the ammo and enemies are chosen randomly then to ensure you can take all the enemies out you will need an infinite amount of ammo.
@Socks is right... although probability says that each type of ammo has a 33% chance of being chosen. And each enemy has an 8% chance. Let's say each enemy takes one bullet to destroy. After 10 chances, you'll have 3 of each bullet and 1 of each enemy (roughly). So you should be able to destroy everything. But probability isn't always reality.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Aah I see!
Thanks @Socks and @tatiang !