first commit

This commit is contained in:
2019-08-13 12:17:37 -05:00
commit d5d82eff27
107 changed files with 6112 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package barnestr;
public class Die {
private int numSides;
private int currentValue;
public Die(int sides) {
this.numSides = sides; // Number of sides on die
roll(); // Rolls die to decide currentValue
}
public int getNumSides() {
return numSides;
}
public int getCurrentValue() {
return currentValue;
}
public void roll() {
currentValue = ((int) (Math.random() * numSides)) + 1;
}
}