diff --git a/Makefile b/Makefile index 15ae2f3..5f9ede6 100644 --- a/Makefile +++ b/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 diff --git a/README.md b/README.md index 7d65abc..193c030 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/RPG.cpp b/src/RPG.cpp new file mode 100644 index 0000000..df5d2f2 --- /dev/null +++ b/src/RPG.cpp @@ -0,0 +1,38 @@ +#include +#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; + } + } + +} diff --git a/src/TobeeRPG.h b/src/TobeeRPG.h new file mode 100644 index 0000000..1936e48 --- /dev/null +++ b/src/TobeeRPG.h @@ -0,0 +1 @@ +void RPG(); diff --git a/src/main.cpp b/src/main.cpp index 840a987..ae12443 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,43 +3,9 @@ */ #include +#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: ";