func drink(){
if(cup.content() == 0){
if(checkPantry("coffee") == true){
getCoffee();
cup.refill();
enjoy();
} else if(checkPantry("tea") == true){
addToGroceryList("coffee");
getTea();
cup.refill();
enjoy();
} else {
addToGroceryList("coffee");
addToGroceryList("tea");
weep();
}
enjoy();
}
}
while(work != done){
setTimer(15);
while(timer != 0){
if(currentTask.done == 1){
getNextTask();
}
work();
}
drink();
}
Check out my deviantArt-Account deviantArt
Here's an Online LaTeX-Compiler from Uni Halle