added header and other cpp files
This commit is contained in:
parent
3c936687a3
commit
b6f9db8264
5 changed files with 44 additions and 37 deletions
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@
|
|||
|
||||
#files to compile
|
||||
|
||||
OBJS = src/main.cpp
|
||||
OBJS = src/main.cpp src/TobeeRPG.h src/RPG.cpp
|
||||
|
||||
#compiler to use
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
THIS GAME/CODE CONTAINS CURSE WORDS AND OTHER OBSCENITIES
|
||||
|
||||
This is game I made for my good friend Tobi
|
||||
To build you need git,make, and g++
|
||||
|
||||
|
@ -9,7 +11,7 @@ Building
|
|||
|
||||
To run
|
||||
|
||||
linux
|
||||
*nix
|
||||
./TobeeRPG
|
||||
|
||||
windows
|
||||
|
|
38
src/RPG.cpp
Normal file
38
src/RPG.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include <iostream>
|
||||
#include "TobeeRPG.h"
|
||||
using namespace std;
|
||||
|
||||
void RPG(){
|
||||
int TobiHP = 10;
|
||||
int BadGuyHP = 5;
|
||||
// makes a variable for user input
|
||||
int UsrIn;
|
||||
cout << "'GIMME YO FUCKIN' MONEY' said the badguy\n";
|
||||
cout << "You need to help him\n";
|
||||
// this is an infinite loop
|
||||
while (true){
|
||||
cout << "Tobi's HP is: " << TobiHP << endl;
|
||||
cout << "BadDude's HP is: " << BadGuyHP << endl;
|
||||
cout << "You can type 1 to kick the guys dick or type 2 to do nothing: ";
|
||||
// this reads the number you typed and then writes it to the variable UsrIn
|
||||
cin >> UsrIn;
|
||||
if(UsrIn==1){
|
||||
cout << "Tobi used dick kick\n";
|
||||
BadGuyHP -= 2;
|
||||
cout << "BadDude says 'Ow My fuckin dick'\n";
|
||||
} else if(UsrIn==2){
|
||||
cout << "BadDude used FUCKING LEAD TO THE HEAD!!!!!!\n";
|
||||
TobiHP -= 999999;
|
||||
cout << "BadDude says 'Fuckin loser scrub cunt wanker bitch'\n";
|
||||
}
|
||||
if (TobiHP<=0) {
|
||||
cout << "Tobi fucking died 'Best ending' \n" << endl;
|
||||
// break ends the loop
|
||||
break;
|
||||
} else if (BadGuyHP<=0) {
|
||||
cout << "Tobi killed a man 'Good ending' \n" << endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
1
src/TobeeRPG.h
Normal file
1
src/TobeeRPG.h
Normal file
|
@ -0,0 +1 @@
|
|||
void RPG();
|
36
src/main.cpp
36
src/main.cpp
|
@ -3,43 +3,9 @@
|
|||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include "TobeeRPG.h"
|
||||
using namespace std;
|
||||
|
||||
void RPG(){
|
||||
int TobiHP = 10;
|
||||
int BadGuyHP = 5;
|
||||
// makes a variable for user input
|
||||
int UsrIn;
|
||||
cout << "'GIMME YO FUCKIN' MONEY' said the badguy\n";
|
||||
cout << "You need to help him\n";
|
||||
// this is an infinite loop
|
||||
while (true){
|
||||
cout << "Tobi's HP is: " << TobiHP << endl;
|
||||
cout << "BadDude's HP is: " << BadGuyHP << endl;
|
||||
cout << "You can type 1 to kick the guys dick or type 2 to do nothing: ";
|
||||
// this reads the number you typed and then writes it to the variable UsrIn
|
||||
cin >> UsrIn;
|
||||
if(UsrIn==1){
|
||||
cout << "Tobi used dick kick\n";
|
||||
BadGuyHP -= 4;
|
||||
cout << "BadDude says 'Ow My fuckin dick'\n";
|
||||
} else if(UsrIn==2){
|
||||
cout << "BadDude used FUCKING LEAD TO THE HEAD!!!!!!\n";
|
||||
TobiHP -= 999999;
|
||||
cout << "BadDude says 'Fuckin loser scrub cunt wanker bitch'\n";
|
||||
}
|
||||
if (TobiHP<=0) {
|
||||
cout << "Tobi fucking died 'Best ending' \n" << endl;
|
||||
// break ends the loop
|
||||
break;
|
||||
} else if (BadGuyHP<=0) {
|
||||
cout << "Tobi killed a man 'Good ending' \n" << endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void PrgEnd() {
|
||||
string Name; // this makes a string called name
|
||||
cout << "To exit the program please type your name: ";
|
||||
|
|
Loading…
Reference in a new issue