Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dhannya Mohan First Saturday #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions src/main/java/WriteIFs.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public class WriteIFs
public void playerDied(boolean player1) {
// Write an IF statement that checks “player1.isAlive()”
// and if that’s false, calls “displayGameOver(player1)”

if (!isAlive(player1)) {
displayGameOver(player1);
}
}

public String thermoSTAT(int room) {
Expand All @@ -21,7 +23,11 @@ public String thermoSTAT(int room) {
// calls “heatOn()” else calls “coolOn()”



if (tempurature(room) < 70){
heatOn();
}else{
coolOn();
}
return this.ss;
}

Expand All @@ -31,13 +37,18 @@ public void fireplaceControl(Object fireplace1) {
// AND
// “insideTemp()” is less than 62,
// calls “startAFire(fireplace1)”
if((outsideTemp() < 50) && (insideTemp() < 62)){
startAFire(fireplace1);

}
}

public void checkFuel(double fuelLevel) {
// Write an IF statement that checks “fuelLevel”
// and if that check is less than 0.08, calls “refuel()”

if (fuelLevel < 0.08){
refuel();
}
}


Expand Down
Loading