diff --git a/main.cpp b/main.cpp index 59b168c..efe6ff6 100644 --- a/main.cpp +++ b/main.cpp @@ -19,16 +19,13 @@ void attack(int humans, int zombies, int *new_humans, int *new_zombies) { } else if (rand() % 100 < infection_chance) { *new_humans = humans - 1; *new_zombies = zombies + 1; - } else { - *new_humans = humans; - *new_zombies = zombies; } } void loop(int hour, int humans, int zombies) { - int new_humans; - int new_zombies; + int new_humans = humans; + int new_zombies = zombies; std:printf("hour: %d| zombies: %d| humans: %d \n", hour, zombies, humans);