// Random Stat Generator and Player Class #include "Player.h" #include #include #include using namespace std; int main() { // Declare Character Details int seed; Player player; string name = player.getPlayerName(); // Set Stats player.setStats(seed); // Enter Name cout << "Enter Player Name: "; cin >> name; player.setPlayerName(name); int health = player.getHealth(); int fight = player.getFight(); int flee = player.getFlee(); int talk = player.getTalk(); cout << name << "'s stats" << endl << "========================" << endl << "Health: " << health << endl << "Fight: " << fight << endl << "Flee: " << flee << endl << "Talk: " << talk << endl << endl; // << "Armor: " << armor << endl // << "Weapon: " << weapon << endl; return 0; } void Player::setStats(int seed) { cin >> seed; srand(seed); // Set Fight Stat and Modifier int fight = getFight(); fight = rand() % 20 + 5; setFight(fight); // Set Flee Stat and Modifier int flee = getFlee(); flee = rand() % 20 + 5; setFlee(flee); // Set Talk Stat and Modifier int talk = getTalk(); talk = rand() % 20 + 5; setTalk(talk); }