Fixed Eating Check

This commit is contained in:
TriantaTV 2022-09-29 22:06:05 -05:00
parent b47f463204
commit 33ec05e766

View File

@ -60,7 +60,7 @@ int main(int argc, char* argv[])
bool AllPhilosophersFull(PhilosopherData PhilosopherList[], int numPhilosophers) bool AllPhilosophersFull(PhilosopherData PhilosopherList[], int numPhilosophers)
{ {
for (int i = 0; i < numPhilosophers; i++) for (int i = 0; i < numPhilosophers; i++)
if (PhilosopherList[i].eatingCount != 2) if (PhilosopherList[i].eatingCount < 2)
return false; return false;
return true; return true;
} }