Esempio n. 1
0
  protected void doARoll(DiceBoard db, Match m, final JButton rollBut) {
    db.rollBoard();

    configure_die(db);
    for (int die = 0; die < DiceBoard.NUMDIE; die++) {
      chbs[die].setEnabled(true);
    }
    switch (db.getNextRollNum()) {
      case 1:
        // Roll number has cycled round to 1.
        rollBut.setEnabled(false); // Will be reset on score allocation
        break;
      case 2:
        rollBut.setText("Second Roll");
        break;
      case 3:
        rollBut.setText("Last Roll");
        break;
    }
  }