if (inventory.contains("Pizza base") && inventory.contains("Tomato")) {
return State.MAKE_INCOMPLETE_PIZZA;
}
if (inventory.contains("Incomplete pizza") && inventory.contains("Cheese")) {
return State.MAKE_UNCOOKED_PIZZA;
}
if (getBank().contains("Pizza base") && getBank().contains("Tomato")) {
return State.WITHDRAW_BASE_TOMATO;
} else if (getBank().contains("Incomplete pizza") && getBank().contains("Cheese")) {
return State.WITHDRAW_INCOMPLETE_CHEESE;
an example
(don't forget to deposit the product item each time too)
But just yeah its a lot to explain. i think ima have to give up im really bad with patients.
Use my example use ititititit.
Make one Task to withdraw and one to combine. Determine which items to combine within the task.
That way you can fix code or append to each step of pizza making by editing it in one place