/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vcbnvcbn;
import java.text.*;
import java.util.*;
import java.util.Random;
/**
 *
 * @author Owner
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
      Random random = new Random();
      Scanner input = new Scanner(System.in);
      String answer = new String();
      String choice = new String();
      int  intchoice;
         int slotmenu;
         int cash ;





//         int cash = 1;
//          do {
//
//          } while (count <= 11);
//     }

//
//         System.out.print("Do you wish to add money)?");
//           answer = input.next();
//            answer = answer.substring(0,6);
//            answer = answer.toUpperCase();

         System.out.println("insert rules here");
          cash = input.nextInt();
      

  System.out.println("Money =" + cash );
 // System.out.println("answer = "+ answer);
 System.out.println("[1] Play Slot");
 System.out.println("[2] Check Money");
 System.out.println("[3] Main Menu");

 System.out.print("Please choose the choice?");
            choice = input.next();
            choice = choice.substring(0,1);
           
    intchoice = Integer.parseInt(choice);
         if (intchoice == 1 )


                    System.out.println("You choose the gampling way");
                    String result = "";   // StringBuilder would be more efficient.            
                    //for (int i = 1; i <= 20; i++) {  
                    //System.out.println(result += i + " squared is " + (i * i) + "\n");
//}
 


            

        System.out.println("You insert $1 and pull the handle.");
        
        cash--;
        
        Random slot1 = new Random();
        Random slot2 = new Random();
        Random slot3 = new Random();
        
         int vslot1 = slot1.nextInt(3) + 1;
         int vslot2 = slot2.nextInt(3) + 1;
         int vslot3 = slot3.nextInt(3) + 1;

         String Gslot1 = new String();
         String Gslot2 = new String();
         String Gslot3 = new String();

if (vslot1 ==1 )
    Gslot1="Bell";
         if (vslot1 ==2 )
    Gslot1="Grape";
         if (vslot1 ==3 )
    Gslot1="Cheery";

      if (vslot2 ==1 )
    Gslot2="Bell";
         if (vslot2 ==2 )
    Gslot2="Grape";
         if (vslot2 ==3 )
    Gslot2="Cheery";

         if (vslot3 ==1 )
    Gslot3="Bell";
         if (vslot3 ==2 )
    Gslot3="Grape";
         if (vslot3 ==3 )
    Gslot3="Cheery";

         System.out.println("===============================");
         System.out.println("===============================");
         System.out.println(" = = = = = = = = = = = = = = =");
         System.out.println(" = ="+" " + Gslot1 +" ="+" "+Gslot2+" ="+" "+ Gslot3+" = =" );
         System.out.println(" = = = = = = = = = = = = = = =");
         System.out.println("===============================");
         System.out.println("===============================");


         //Test the values


if ((vslot1 == 1) &&  (vslot2 == 1) && (vslot3 == 1)){
    System.out.println("You win 1 the Bells");
         cash = 10 * cash;
         System.out.println(cash);

}

         if ((vslot1 == 2) &&  (vslot2 == 2) && (vslot3 == 2)){
System.out.println("You win 2 the Grape");
 cash = 7 * cash;
 System.out.println(cash);
         }

         if ((vslot1 == 3) &&  (vslot2 == 3) && (vslot1 == 3)){
System.out.println("You win 3 the CHEERY");
  cash = 5 * cash;
  System.out.println(cash);
         }
         if ((vslot1 == 1) &&  (vslot2 == 1) && (vslot3 != 1)){
System.out.println("Case No4");
 cash = 3 * cash;
 System.out.println(cash);
         }

         if ((vslot1 == 1) &&  (vslot2 != 1) && (vslot3 == 1)){
System.out.println("Case no 5");
  cash = 3 * cash;
  System.out.println(cash);}


         if ((vslot1 != 1) &&  (vslot2 == 1) && (vslot3 == 1)){
System.out.println("case no 6");
 cash = 3 * cash;
 System.out.println(cash);
 {

         if ((vslot1 == 2) &&  (vslot2 == 2) && (vslot3 != 2)){
System.out.println("case No 7");
  cash = 1 * cash;
  System.out.println(cash);
         }

         if ((vslot1 == 2) &&  (vslot2 != 2) && (vslot3 == 2)){
System.out.println("cas no 8");
   cash = 1 * cash;
   System.out.println(cash);
         }

         if ((vslot1 != 2) &&  (vslot2 == 2) && (vslot3 == 2)){
     System.out.println("case no 9");
    cash = 1 * cash;
    System.out.println(cash);
         }

       else  {
             System.out.println("case no X");
             System.out.println(cash);
       }
      
              //while (cash >= 0) ;



//         if ((vslot1 == vslot2) &&  (vslot2 == vslot3) && (vslot1 != vslot3))
//System.out.println("You lost the 1 no 3");
//
//         if ((vslot1 == vslot2) &&  (vslot2!= vslot3) && (vslot1 == vslot3))
//System.out.println("You lost the 2 no 3");
//
//         if ((vslot1 != vslot2) &&  (vslot2 == vslot3) && (vslot1 == vslot3))
//System.out.println("You lost the 1 no 2");
//
//         if ((vslot1 != vslot2) &&  (vslot2 != vslot3) && (vslot1 == vslot3))
//System.out.println("You lost the  3");
//
//         if ((vslot1 != vslot2) &&  (vslot2 != vslot3) && (vslot1 != vslot3))
//System.out.println("You Lost the joke");
         
            //else
          if (intchoice == 2) {
                        System.out.println("You choose the check Money "+ cash+ "" );

          }



 
 while(cash < 11);

 }}}
    