Skip to content
Permalink
0d826c2cb8
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
24 lines (22 sloc) 566 Bytes
package model;
import java.util.Random;
public class Die {
/*
* Die will probably have to go in each individual turn, so that it can pull charity status
* from the player currently playing
*/
public int rollDice(Boolean c) {
Random rand = new Random();
if (c) {
int face = 1+rand.nextInt(12);
return face;
/* There needs to be something that takes charity - 1 from the player after rolling
* Or maybe just a simple "if charity > 0 then charity - 1 after every turn
*/
}
else {
int face = 1+rand.nextInt(6);
return face;
}
}
}