Hi!
I’m making a coffee shop management minigame where the player has to create drinks using coffee, milk and foam. The idea is that the player will receive a recipe with the required % of each (example: 45% coffee, 45%milk, 5% foam) and will have to match those values on a coffee machine.
I would like to give the player a safe range, where, for example, if he made the drink with 42% coffee, 46% milk and 3% foam it would still be right, but I’m having trouble on finding a function or logic that would validate any value between a given range.
Each item of the recipe is a variable that will be generated randomly, so I want something that would be like:
CupCoffee = Coffee + or - 5, where any value between Coffee + 5 and Coffee - 5 would be valid.
Does anyone have experience with it?