Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package dicegame;
- import java.util.Random;
- /**
- *
- * @author Silas
- */
- public class Die {
- private int eyes;
- private Random randRoll = new Random();
- public void roll() {
- eyes = randRoll.nextInt(6) + 1;
- }
- public int getEyes() {
- return eyes;
- }
- public Die() {
- }
- /*
- private int roll(){
- Random randRoll = new Random();
- return randRoll.nextInt(size)+1;
- }
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement