import java.util.*; public class LotteryGameTester { public static void main(String[] args) { final Random GEN = new Random(); final int NUMBER_OF_PANELS = 10; //Select a Lottery Game and Set the Game Parameters LotteryGame game = LotteryGame.values()[GEN.nextInt(LotteryGame.values().length)]; final String GAME_NAME = game.getName(); final int PICKS_PER_GAME = game.getNumberOfPicks(); final int HIGHEST_PICK = game.getHighestPick(); //Create a Lottery Game Play Slip of 10 Panels LotteryGamePlaySlip playSlip = new LotteryGamePlaySlip(GAME_NAME, NUMBER_OF_PANELS, HIGHEST_PICK ); /* String labels = playSlip.getLabels(); //Mark the first 2 Panels with self-selected picks switch ( PICKS_PER_GAME ) { case 5 : playSlip.selfPick( labels.charAt(0), new int[] {3, 7, 13, 29, 35} ); playSlip.selfPick( labels.charAt(1), new int[] {1, 2, 10, 12, 28} ); break; case 6 : playSlip.selfPick( labels.charAt(0), new int[] {3, 7, 10, 13, 29, 35} ); playSlip.selfPick( labels.charAt(1), new int[] {1, 2, 12, 28, 40, 51} ); } //Mark SOME randomly selected remaining Panels with quick-picks for (int panel = 2; panel < NUMBER_OF_PANELS; panel++) if ( GEN.nextBoolean() ) playSlip.quickPick( playSlip.getLabels().charAt(panel), PICKS_PER_GAME ); //Void a randomly selected non-self-pick Panel (Panel may not have been marked) int panel = 2 + GEN.nextInt(NUMBER_OF_PANELS - 2); playSlip.cancel( playSlip.getLabels().charAt(panel) ); */ //Display the completed Play Slip System.out.println(playSlip); } public enum LotteryGame { LOTTO(6, 53), FANTASY(5, 36); private int numberOfPicks; private int highestPick; private LotteryGame(int picks, int highest) { this.numberOfPicks = picks; this.highestPick = highest; } public String getName() { return this.name(); } public int getNumberOfPicks() { return this.numberOfPicks; } public int getHighestPick() { return this.highestPick; } } }