Beispiel #1
0
  public static void main(String[] args) {

    IWheel wheel = new Wheel(37);
    ICroupier croupier = new Croupier(wheel);

    ICustomer customer = new Customer(50);
    Random random = new Random();
    int randomPocketValue = random.nextInt(wheel.getPockets().size());
    IPocket chosenPocket = new Pocket(String.valueOf(randomPocketValue));
    IBet bet = new Bet(10, chosenPocket, BetType.POCKET);
    customer.placeBet(bet);

    try {

      croupier.play(customer, bet);
    } catch (RouletteGameException ex) {

    }
  }