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

Initialize repository

parent 730412bc
......@@ -5,7 +5,7 @@
#include <iostream>
using namespace std;
// class Stats {
// class Player {
// private:
// int fight,
// flight,
......@@ -16,16 +16,15 @@ using namespace std;
// int setStats(Stats);
// };
void setStats(int&, int&, int&, int&, int&, int&, int&, int&);
void setStats(int&, int&, int&, int&, int&, int&);
int main() {
int seed,
fight, fightMod,
flee, fleeMod,
think, thinkMod,
talk, talkMod,
fight = 10,
flee = 10,
talk = 10,
health = 100;
string playerName;
......@@ -36,14 +35,14 @@ int main() {
cout << "Enter Player Name: ";
cin >> playerName;
setStats(fight, flee, think, talk, fightMod, fleeMod, thinkMod, talkMod);
setStats(fight, flee, talk, fightMod, fleeMod, talkMod);
cout << playerName << "'s stats" << endl
<< "========================" << endl
<< "Health: " << health << endl
<< "Fight: " << fight << " " << fightMod << endl
<< "Talk: " << talk << " " << talkMod << endl
<< "Flee: " << flee << " " << fleeMod << endl;
<< "Fight: " << fight << " " << endl
<< "Talk: " << talk << " " << endl
<< "Flee: " << flee << " " << endl;
......@@ -54,7 +53,7 @@ int main() {
return 0;
}
// Stats::Stats() {
// Player::Player() {
// fight = rand() % 20 + 5;
// flight = rand() % 20 + 5;
// think = rand() % 20 + 5;
......@@ -62,34 +61,13 @@ int main() {
// 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
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
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
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