Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. //be back in ~1hour you lil bitch follow direction and theres no dupes but still msg me if it doesnt work
  2.  
  3. //ADD THIS FUNCTION ABOVE MAIN
  4. int dup1(int a[0][0][5][5], int p, int c, int d)
  5. {
  6. int i, j;
  7. for (i = 0; i < 5; i++)
  8. {
  9. for (j = 0; j<5; j++)
  10. {
  11. if (a[p][c][i][j] == d)
  12. {
  13. return 1;
  14. }
  15. }
  16. }
  17. return 0;
  18. }
  19.  
  20. // REPLACE ALL THAT SHIT WITH THIS
  21. int num = (int)rand() % 75 + 1;
  22. int dup = dup1(bingoBoard, a, b, num);
  23. while (dup != 0)
  24. {
  25. num = ((rand() % 75) + 1);
  26. dup = dup1(bingoBoard, a, b, num);
  27. }
  28. bingoBoard[z][x][i][j] = num;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement