Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. #pragma region Counter always change
  2.  
  3. int tempRand = rand() % 100;
  4. int enemyThrow = opp_throw[round - 1];
  5. int options[2];
  6.  
  7. if (enemyThrow == ROCK) {
  8.  
  9. options[0] = PAPER;
  10. options[1] = SCISSORS;
  11.  
  12. if(enemyPreferred != 4) {
  13. if(enemyPreferred == PAPER) {
  14. if (tempRand < 65) {
  15. return SCISSORS;
  16. }
  17.  
  18. else {
  19. return ROCK;
  20. }
  21.  
  22. }
  23. if(enemyPreferred == SCISSORS) {
  24. if (tempRand < 65) {
  25. return ROCK;
  26. }
  27.  
  28. else {
  29. return SCISSORS;
  30. }
  31. }
  32.  
  33.  
  34. }
  35. else {
  36. if (tempRand < 50) {
  37. return options[0];
  38. }
  39.  
  40. else {
  41. return options[1];
  42. }
  43. }
  44. }
  45. else if (enemyThrow == PAPER) {
  46. options[0] = ROCK;
  47. options[1] = SCISSORS;
  48. if (enemyPreferred != 4) {
  49. if (enemyPreferred == ROCK) {
  50. if (tempRand < 65) {
  51. return PAPER;
  52. }
  53.  
  54. else {
  55. return ROCK;
  56. }
  57.  
  58. }
  59. if (enemyPreferred == SCISSORS) {
  60. if (tempRand < 65) {
  61. return ROCK;
  62. }
  63.  
  64. else {
  65. return SCISSORS;
  66. }
  67. }
  68. else {
  69. if (tempRand < 50) {
  70. return options[0];
  71. }
  72.  
  73. else {
  74. return options[1];
  75.  
  76. }
  77.  
  78. }
  79. }
  80.  
  81.  
  82. else if (enemyThrow == SCISSORS) {
  83. options[0] = ROCK;
  84. options[1] = PAPER;
  85.  
  86. if (enemyPreferred != 4) {
  87. if (enemyPreferred == PAPER) {
  88. if (tempRand < 65)
  89. return SCISSORS;
  90. else
  91. return PAPER;
  92. }
  93. if (enemyPreferred == ROCK) {
  94. if (tempRand < 65)
  95. return PAPER;
  96. else
  97. return ROCK;
  98. }
  99. }
  100.  
  101.  
  102. }
  103.  
  104. else {
  105. if (tempRand < 50) {
  106. return options[0];
  107. }
  108.  
  109. else {
  110. return options[1];
  111. }
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement