diff --git a/zombies.c b/zombies.c index ed38e89..b85d0de 100644 --- a/zombies.c +++ b/zombies.c @@ -1,7 +1,7 @@ #include #include #include - +#include void addZombie(){ if(getOpenPos()){ int attempts=0; @@ -45,14 +45,22 @@ void addZombie(){ } void moveZombies(){ - int i; - for(i=1;itype,"zombie")){ + allEntities[i].nextYpos = allEntities[i].curYpos; + allEntities[i].nextXpos = allEntities[i].curXpos; + } + } if(allEntities[i].nextYpos < 1 || allEntities[i].nextYpos>viewportWinRows-2){ allEntities[i].nextYpos = allEntities[i].curYpos; } @@ -61,5 +69,5 @@ void moveZombies(){ } } } - } + } }