Ejemplo n.º 1
0
 public void updateRoll(int i) {
   _dieRoll = i;
   twoDice =
       new int[] {
         (int) Math.max(Math.floor(Math.random() * Math.min(_dieRoll - 1, 5)) + 1, _dieRoll - 6), 1
       };
   twoDice[1] = _dieRoll - twoDice[0];
   repaint();
 }