Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void check(std::string buildingName, int floorLevel, std::string drinkName, float drinkSize, struct machines)
- {
- bool correct = true;
- if (buildingName == "Snell")
- {
- if (floorLevel == 1 || floorLevel == 3)
- {
- if (floorLevel == 1)
- {
- for (int i = 0; i < 10; i++)
- {
- if (machines.vendingMachines[0].drinkTypes[i].drinkName == drinkName && machines.vendingMachines[0].drinkTypes[i].drinkSize == drinkSize)
- {
- correct = true;
- }
- }
- }
- else
- {
- for (int i = 0; i < 10; i++)
- {
- if (machines.vendingMachines[2].drinkTypes[i].drinkName == drinkName && machines.vendingMachines[2].drinkTypes[i].drinkSize == drinkSize)
- {
- correct = true;
- }
- }
- }
- }
- else
- {
- correct = false;
- }
- }
- else
- {
- correct = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement