|
@@ -1,4 +1,4 @@
|
1
|
|
-
|
|
1
|
+
|
2
|
2
|
/**
|
3
|
3
|
* Write a description of class WriteIFs here.
|
4
|
4
|
*
|
|
@@ -7,12 +7,17 @@
|
7
|
7
|
*/
|
8
|
8
|
public class WriteIFs
|
9
|
9
|
{
|
|
10
|
+ int x;
|
|
11
|
+ int tt_t;
|
|
12
|
+ int tt_s;
|
|
13
|
+ int oo1, oo2;
|
|
14
|
+ String ss;
|
10
|
15
|
|
11
|
16
|
public void playerDied(boolean player1) {
|
12
|
17
|
// Write an IF statement that checks “player1.isAlive()”
|
13
|
18
|
// and if that’s false, calls “displayGameOver(player1)”
|
14
|
19
|
|
15
|
|
- if (player1 == false) {
|
|
20
|
+ if (isAlive(player1) == false) {
|
16
|
21
|
displayGameOver(player1);
|
17
|
22
|
}
|
18
|
23
|
|
|
@@ -37,7 +42,7 @@ public class WriteIFs
|
37
|
42
|
// “insideTemp()” is less than 62,
|
38
|
43
|
// calls “startAFire(fireplace1)”
|
39
|
44
|
|
40
|
|
- if (outsideTemp() < 50 && insideTemp() < 62) {
|
|
45
|
+ if (outsideTemp() < 50 || insideTemp() < 62) {
|
41
|
46
|
startAFire(fireplace1);
|
42
|
47
|
}
|
43
|
48
|
|
|
@@ -59,11 +64,7 @@ public class WriteIFs
|
59
|
64
|
*
|
60
|
65
|
* instance variables
|
61
|
66
|
* /
|
62
|
|
- int x;
|
63
|
|
- int tt_t;
|
64
|
|
- int tt_s;
|
65
|
|
- int oo1, oo2;
|
66
|
|
- String ss;
|
|
67
|
+
|
67
|
68
|
|
68
|
69
|
|
69
|
70
|
/**
|