Advertisement
Homebr3w

SlotRunner.java

Feb 13th, 2020
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1. public class SlotRunner
  2. {
  3.     public static void main(String[] args)
  4.     {
  5.         SlotMachine test = new SlotMachine("penguin", "gnu", "linux", "ubuntu", "mint", "openwrt");
  6.        
  7.         //to be used in Part A
  8.         while ( !test.getWinner() )
  9.         {
  10.             System.out.println("spin "+ spinNum + ": "+ test.spin());
  11.             spinNum++;
  12.             if(test.getWinner())
  13.             {
  14.                 System.out.println("you won\n");
  15.             }
  16.             else
  17.             {
  18.                 System.our.println("you lost\n");
  19.             }
  20.         }    
  21.  
  22.    
  23.     //you will add code for Part B
  24.        
  25.     }
  26.    
  27.     //to be used in Part B  
  28.     public static void trials(SlotMachine test, int num)
  29.     {
  30.        
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement