Guest User

Untitled

a guest
May 23rd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. function calculateWinnings($position) {
  2. echo $position[1].$position[2].$position[3].$position[4];
  3. die();
  4. if (($position[1]==$position[2] && $position[1]==$position[3]) ||
  5. ($position[1]==$position[2] && $position[1]==$position[4]) ||
  6. ($position[1]==$position[3] && $position[1]==$position[4]) ||
  7. ($position[2]==$position[3] && $position[2]==$position[4])) {
  8. echo "Bob, you have 3 numbers right.";
  9. } elseif ($position[1]==$position[2] && $position[2]==$position[3] &&
  10. $position[3]==$position[4]) {
  11. echo "Congratulations Bob! You have 4 numbers right.";
  12. } elseif
  13. (($position[1]==$position[2] && $position[3]==$position[4]) ||
  14. ($position[1]==$position[3] && $position[2]==$position[4]) ||
  15. ($position[1]==$position[4] && $position[2]==$position[3])) {
  16. echo "Bob, you have 2 pairs of numbers right.";
  17. } elseif
  18. (($position[1]==$position[2]) || ($position[1]==$position[3]) ||
  19. ($position[1]==$position[4]) || ($position[2]==$position[3]) ||
  20. ($position[2]==$position[4]) || ($position[3]==$position[4])) {
  21. echo "Bob, you have 2 numbers right.";
  22. } else {
  23. echo "You did not win but you should spin again.";
  24. }
  25. }
  26.  
  27. showGameHead($time);
  28.  
  29. if ($cashout) {
  30. echo $position[1].$position[2].$position[3].$position[4];
  31. calculateWinnings($position);
  32. otherChoices($position,$time,$i,$PHP_SELF);
  33. die();
  34. }
  35.  
  36.  
  37. if (!isset($_POST['submit']) || ($i==1)) {
  38. $time = date("H:i");
  39.  
  40. spinwheels(1,1,1,1);
  41. imageSwitch($position);
  42. showWheels($img1,$img2,$img3,$img4);
  43. showChoices($position,$time,$i);
  44.  
  45. } elseif ($i<4) {
Add Comment
Please, Sign In to add comment