Permalink
Cannot retrieve contributors at this time
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?
2102-Group-Project-Spring-2017/src/die.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
23 lines (21 sloc)
551 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} | |
} |