Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.99 KB | None | 0 0
  1. import java.util.*;
  2. public class SlotMachine{
  3.    static Scanner input = new Scanner(System.in);
  4.    
  5.    
  6.     public static void main(String[] args){
  7.    showMenu();
  8.    play(1000);
  9.    System.out.println("Game Over!");
  10.  
  11.     }//End Main.
  12.    
  13.     public static void play(int userMoney){
  14.     int userBet = getUserBet();
  15.     if(isBetLegal(userBet)){
  16.       calculate(userMoney, userBet);
  17.     } else {
  18.     System.out.println("Wrong bet, try again!");
  19.     play(userMoney);
  20.     }
  21.    
  22.    
  23.     }//End Play
  24.    public static void calculate(int userMoney, int userBet){
  25.    int[] threeRandNumbers = generateArrayThreeRandNumbers();
  26.    
  27.    for(int i = 0;i < 3;i++){
  28.    
  29.    }
  30.    
  31.     }
  32.    
  33.    
  34.    
  35.     public static void startSlotMachine(int userMoney){
  36.    
  37.     int userAction = input.nextInt();
  38.    
  39.     if(userAction == 1){
  40.     getUserBet(userMoney);
  41.     }
  42.    
  43.     }
  44.    
  45.    
  46.     public static void getUserBet(int userMoney){
  47.     return input.nextInt();
  48.    
  49.     }
  50.  
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement