#include <stdio.h>
#include <stdbool.h> //I learned that you need to add stdbool.h to make the bool function work - Chris
int main(void) {
printf("You will have life functions. You will get 3 lifes.\n");
char life [3];
int aa;
printf("You have 3 lifes");
printf("Press 'S' to start");
scanf("%i",&aa);
bool PlayerDied( PlayerData * pd )
{
bool alive = false;
--pd->Lives; // player died - one less life
return pd->Lives <= 0;
alive = true; // player still has a life left
return alive;
}
return 0;
}
0 Answer(s)