summaryrefslogtreecommitdiff
path: root/src/Q4/RandomSumGame.java
diff options
context:
space:
mode:
authormo <mo.khan@gmail.com>2019-06-18 17:56:27 -0600
committermo <mo.khan@gmail.com>2019-06-18 17:56:27 -0600
commit85d59210513ae96412e06e0b56842b7e19232927 (patch)
tree2c1acc9ba43ec1f6024679dba6e5d18fe66542dd /src/Q4/RandomSumGame.java
parent52a4b2209a2a83323091214360258ed224db72ed (diff)
add description of the code
Diffstat (limited to 'src/Q4/RandomSumGame.java')
-rw-r--r--src/Q4/RandomSumGame.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Q4/RandomSumGame.java b/src/Q4/RandomSumGame.java
index 06204ac..183498b 100644
--- a/src/Q4/RandomSumGame.java
+++ b/src/Q4/RandomSumGame.java
@@ -12,14 +12,14 @@ import java.io.*;
import java.util.*;
public class RandomSumGame {
- private boolean start;
+ private boolean start = true;
private int d1 = 0;
private int d2 = 0;
private int sum = 0;
private int valuePoint = 0;
private int wins = 0;
private int losses = 0;
- private String status;
+ private String status = "";
private PrintStream out;
/**
@@ -56,7 +56,8 @@ public class RandomSumGame {
}
/**
- * Plays a roll of the given dice.
+ * Plays a roll of the given dice. This is a method overload of the
+ * previous play method.
*
* @param d1 the value of the roll for the first dice
* @param d2 the value of the roll for the second dice