Browse Source

all WriteIf tests pass except first method

Margaret Pierse 6 years ago
parent
commit
c8cc28da09
1 changed files with 9 additions and 7 deletions
  1. 9
    7
      WriteIFs.java

+ 9
- 7
WriteIFs.java View File

@@ -27,15 +27,15 @@ public class WriteIFs
27 27
         oo2 = 49;
28 28
     }
29 29
 
30
-    //public boolean playerDied(boolean player1) {
31
-        // Write an IF statement that checks “player1.isAlive()” 
32
-        // and if that’s false, calls “displayGameOver(player1)”
30
+    // public void playerDied(boolean player1) {
31
+        // //Write an IF statement that checks “player1.isAlive()” 
32
+        // //and if that’s false, calls “displayGameOver(player1)”
33 33
 
34
-        // if (player1.isAlive()) {
35
-            // return displayGameOver(player1);
34
+        // if (player1) {
35
+            // displayGameOver(player1);
36 36
         // }
37 37
 
38
-    //}
38
+    // }
39 39
 
40 40
     public String thermoSTAT(int room) {
41 41
         // Write an IF statement that checks the 
@@ -64,7 +64,9 @@ public class WriteIFs
64 64
     public void checkFuel(double fuelLevel) {
65 65
         // Write an IF statement that checks “fuelLevel” 
66 66
         // and if that check is less than 0.08, calls “refuel()”
67
-        //if(check){}
67
+        if(fuelLevel < .08){
68
+        refuel();
69
+    }
68 70
     }
69 71
 
70 72
     /**