Skip to content

Commit

Permalink
chore: Fixed solution not matching tODO in BaseCookware for letCook
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBeege committed Jan 24, 2021
1 parent 9f3fce7 commit 17eea87
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@ public void setLocation(IAppliance location) {
}

public void letCook() {
for(Ingredient ingredient : contents.values()) {
ingredient.cook(getCookState());
System.out.println(ingredient.getName() + " is now " + COOK_STATE);
if(state.equals(HOT)) {
for (Ingredient ingredient : contents.values()) {
ingredient.cook(getCookState());
System.out.println(ingredient.getName() + " is now " + getCookState());
}
} else {
System.out.println("Cookware is not hot yet. Please heat it more.");
}
}

Expand Down

0 comments on commit 17eea87

Please sign in to comment.