Bläddra i källkod

all WriteIf tests pass except first method

Margaret Pierse 6 år sedan
förälder
incheckning
c8cc28da09
1 ändrade filer med 9 tillägg och 7 borttagningar
  1. 9
    7
      WriteIFs.java

+ 9
- 7
WriteIFs.java Visa fil

27
         oo2 = 49;
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
     public String thermoSTAT(int room) {
40
     public String thermoSTAT(int room) {
41
         // Write an IF statement that checks the 
41
         // Write an IF statement that checks the 
64
     public void checkFuel(double fuelLevel) {
64
     public void checkFuel(double fuelLevel) {
65
         // Write an IF statement that checks “fuelLevel” 
65
         // Write an IF statement that checks “fuelLevel” 
66
         // and if that check is less than 0.08, calls “refuel()”
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
     /**