Commit 2536468

mo <mo.khan@gmail.com>
2019-06-18 23:32:01
invert unless to if
1 parent bf82cc6
Changed files (1)
src/Q4/RandomSumGame.java
@@ -25,11 +25,8 @@ public class RandomSumGame {
   public void play(int d1, int d2) {
     int total = d1 + d2;
     this.puts("You rolled: %d", total);
-    if (!hasValuePoint()) {
-      this.firstPlay(total);
-    } else {
-      this.subsequentPlay(total);
-    }
+    if (hasValuePoint()) this.subsequentPlay(total);
+    else this.firstPlay(total);
   }
 
   public void rollDice() {