Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h> //For the RNG
- int main()
- //NOTE TO SELF PRESS BUILD AND RUN
- //DON'T FORGET SEMI COLONS
- {
- //Start off by making the vars for health
- int p1_health = 100;
- int ai_health = 100;
- //Now for damage
- int ember = 5;
- int inferno = 15;
- int counter = 0;
- //Now to make a "UI"
- printf("Hi are you ready to play? If this is your first time playing, type 'h' if you are ready to play, press 's' ");
- char start_up;
- scanf("%c", &start_up);
- //Game start
- do{
- //Player one's go
- printf("You have %d HP" ,p1_health);
- printf(" and the computer has %d HP\n" ,ai_health);
- printf("Choose your move: type 'e' for ember or 'i' for inferno\n");
- char move;
- scanf("%c", &move);
- //printf("\n%c\n", move);
- if(move=='e'){
- int a = 5;
- int b = a-2;
- printf("%d", b);
- }
- }
- while(p1_health > 0 || ai_health > 0);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement