From 2021871d818d6220de4ff3fa69590f1e1e352cbd Mon Sep 17 00:00:00 2001 From: Jacklyn J Videira Date: Tue, 28 Feb 2017 12:19:57 -0500 Subject: [PATCH] Create die.java --- src/die.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/die.java diff --git a/src/die.java b/src/die.java new file mode 100644 index 0000000..dc4eb3f --- /dev/null +++ b/src/die.java @@ -0,0 +1,23 @@ +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; + } + } +}