Skip to content
Snippets Groups Projects
Commit 874b58b7 authored by BOVO Pascal's avatar BOVO Pascal
Browse files

hypothesis of already there oignons if cooking without enough oignons

parent 4049ca29
Branches
No related tags found
No related merge requests found
......@@ -158,7 +158,12 @@ bool Solution::load(){
}
}
}
if (action.action == Cook && action.where == CookLoc){
if (action.action == Cook){
if (currentState.nbOnionsInCook < 3){
for (size_t i = 0; i < _states.size() ; i++){
_states[i].nbOnionsInCook += (3-currentState.nbOnionsInCook);
}
}
currentState.nbOnionsInCook = 0;
currentState.soupReady = true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment