All pastes #730758 Raw Edit

MVi

public java v1 · immutable
·published 2007-10-09 14:17 UTC
rendered paste body
public Dice{  private int throw1;  private int throw2;  public Dice() {    Random rand = new Random();    throw1 = rand.nextInt(6) +1;    throw2 = rand.nextInt(6) +1;  }  public int total() { return throw1 + throw2; }  public bool doubles() { return throw1 == throw2; }}