Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(timer){ //Check for Bomb Drop
- randAlien = rand() %10; //Pick the starting alien out of 10
- int i = 0;
- while(i<10){ //Cycle through all aliens if the first fails
- testAlien = randAlien + i % 10; //Ensure cycle loops back after 10
- if(alien[testAlien] != dead && alien[testAlien] != lastBomb){ //Check to see if we have the right alien
- int j = 0;
- while(j < 4) { //Cycle through all bomb slots
- if(bomb[j] != visible){ //Check to see if this bomb can be dropped
- dropBomb(bomb[j]); //Drop bomb
- j = 4;
- }
- j++;
- }
- i = 10; //Stop checking aliens once one succeeds
- }
- i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement