Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Die {
- private Random generator = new Random();
- private int faceValue;
- private boolean isBlocked;
- public Die(){
- isBlocked=false;
- faceValue=generator.nextInt(6)+1;
- }
- public boolean isBlocked() {
- return false;
- }
- public void unblock() {
- isBlocked=false;
- }
- public void block() {
- isBlocked=true;
- }
- public int value() {
- return this.faceValue;
- }
- public void roll(){
- this.faceValue=generator.nextInt(6)+1;
- //faceValue=generator.nextInt(6)+1;
- }
- }
- public class DiceHand {
- private List<Integer> faces=new ArrayList<Integer>();
- public DiceHand(List<Die> dice) {
- }
- public int get(int die ){
- return die;
- }
- public int sum(){
- int sum=0;
- sum=sum+Die.value()
- return
- }
- public int count(int faceValue){
- return faceValue;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement