Commit 4202373f authored by Kameron Kinsey's avatar Kameron Kinsey

Initialize repository

parent 730412bc
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <iostream> #include <iostream>
using namespace std; using namespace std;
// class Stats { // class Player {
// private: // private:
// int fight, // int fight,
// flight, // flight,
...@@ -16,16 +16,15 @@ using namespace std; ...@@ -16,16 +16,15 @@ using namespace std;
// int setStats(Stats); // int setStats(Stats);
// }; // };
void setStats(int&, int&, int&, int&, int&, int&, int&, int&); void setStats(int&, int&, int&, int&, int&, int&);
int main() { int main() {
int seed, int seed,
fight, fightMod, fight = 10,
flee, fleeMod, flee = 10,
think, thinkMod, talk = 10,
talk, talkMod,
health = 100; health = 100;
string playerName; string playerName;
...@@ -36,14 +35,14 @@ int main() { ...@@ -36,14 +35,14 @@ int main() {
cout << "Enter Player Name: "; cout << "Enter Player Name: ";
cin >> playerName; cin >> playerName;
setStats(fight, flee, think, talk, fightMod, fleeMod, thinkMod, talkMod); setStats(fight, flee, talk, fightMod, fleeMod, talkMod);
cout << playerName << "'s stats" << endl cout << playerName << "'s stats" << endl
<< "========================" << endl << "========================" << endl
<< "Health: " << health << endl << "Health: " << health << endl
<< "Fight: " << fight << " " << fightMod << endl << "Fight: " << fight << " " << endl
<< "Talk: " << talk << " " << talkMod << endl << "Talk: " << talk << " " << endl
<< "Flee: " << flee << " " << fleeMod << endl; << "Flee: " << flee << " " << endl;
...@@ -54,7 +53,7 @@ int main() { ...@@ -54,7 +53,7 @@ int main() {
return 0; return 0;
} }
// Stats::Stats() { // Player::Player() {
// fight = rand() % 20 + 5; // fight = rand() % 20 + 5;
// flight = rand() % 20 + 5; // flight = rand() % 20 + 5;
// think = rand() % 20 + 5; // think = rand() % 20 + 5;
...@@ -62,35 +61,14 @@ int main() { ...@@ -62,35 +61,14 @@ int main() {
// return // return
// } // }
void setStats(int &fight, int &flee, int &think, int &talk, int &fightMod, int &fleeMod, int &thinkMod, int &talkMod) { void setStats(int &fight, int &flee, int &talk, int &fightMod, int &fleeMod, int &talkMod) {
// Set Fight Stat and Modifier // Set Fight Stat and Modifier
fight = rand() % 20 + 5; fight = rand() % 20 + 5;
if (fight == 5) fightMod = -3;
else if (fight == 6 || 7) fightMod = -2;
else if (fight == 8 || 9) fightMod = -1;
else if (fight == 12 || 13) fightMod = 1;
else if (fight == 14 || 15) fightMod = 2;
else if (fight == 16 || 17) fightMod = 3;
else if (fight == 18 || 19) fightMod = 4;
else if (fight < 20) fightMod = 5;
else fightMod = 0;
// Set Flee Stat and Modifier // Set Flee Stat and Modifier
flee = rand() % 20 + 5; flee = rand() % 20 + 5;
if (fight == 5) fightMod = -3;
else if (fight == 6 || 7) fightMod = -2;
else if (fight == 8 || 9) fightMod = -1;
else if (fight == 12 || 13) fightMod = 1;
else if (fight == 14 || 15) fightMod = 2;
else if (fight == 16 || 17) fightMod = 3;
else if (fight == 18 || 19) fightMod = 4;
else if (fight < 20) fightMod = 5;
else fightMod = 0;
// Set Think Stat and Modifier
think = rand() % 20 + 5;
// Set Talk Stat and Modifier // Set Talk Stat and Modifier
talk = rand() % 20 + 5; talk = rand() % 20 + 5;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment