Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
yo
- Loading branch information
Joe
authored and
Joe
committed
Feb 28, 2017
1 parent
540ded3
commit 0d826c2
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
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; | ||
} | ||
} | ||
} |