infogulch

Untitled

Dec 11th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. //mod = dif/10; //unneeded
  2. bombs = size*size*dif/10;
  3. while (bombs > 0) {
  4. int j = rand() %size +1;
  5. int k = rand() %size +1;
  6. if(actualGrid[j][k] == 0){
  7. actualGrid[j][k] = 1;
  8. bombs--;
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment