Commit 81bd554e authored by Kameron Kinsey's avatar Kameron Kinsey

Initialize repository

parent 4202373f
// Random Stat Generator
// Random Stat Generator and Player Class
#include <cstring>
#include <cstdlib>
#include <iostream>
using namespace std;
// class Player {
// private:
// int fight,
// flight,
// think,
// talk,
// health = 100;
// public:
// int setStats(Stats);
// };
void setStats(int&, int&, int&, int&, int&, int&);
class Player {
private:
int fight = 10,
flee = 10,
talk = 10,
health = 100;
string playerName;
public:
int getFight() { return fight; }
int getFlee() { return flee; }
int getTalk() { return talk; }
int getHealth() { return health; }
string getPlayerName() { return playerName; }
void setStats();
};
int main() {
// Declare Character Details
int seed;
// fight = 10,
// flee = 10,
// talk = 10,
// health = 100;
//item armor;
//item weapon;
int seed,
fight = 10,
flee = 10,
talk = 10,
health = 100;
string playerName;
Player player;
string name = player.getPlayerName();
// Enter Seed
cin >> seed;
srand(seed);
// Enter Name
cout << "Enter Player Name: ";
cin >> playerName;
cin >> name;
setStats(fight, flee, talk, fightMod, fleeMod, talkMod);
// Set Stats
player.setStats();
cout << playerName << "'s stats" << endl
cout << name << "'s stats" << endl
<< "========================" << endl
<< "Health: " << health << endl
<< "Fight: " << fight << " " << endl
<< "Talk: " << talk << " " << endl
<< "Flee: " << flee << " " << endl;
<< "Health: " << player.getHealth() << endl
<< "Fight: " << player.getFight() << endl
<< "Flee: " << player.getFlee() << endl
<< "Talk: " << player.getTalk() << endl
<< endl;
// << "Armor: " << armor << endl
// << "Weapon: " << weapon << endl;
......@@ -61,15 +74,18 @@ int main() {
// return
// }
void setStats(int &fight, int &flee, int &talk, int &fightMod, int &fleeMod, int &talkMod) {
void Player::setStats() {
// Set Fight Stat and Modifier
int fight = getFight();
fight = rand() % 20 + 5;
// Set Flee Stat and Modifier
int flee = getFlee();
flee = rand() % 20 + 5;
// Set Talk Stat and Modifier
int talk = getTalk();
talk = rand() % 20 + 5;
}
\ No newline at end of file
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