diff --git a/Kam_set_stats.cpp b/Player.cpp similarity index 65% rename from Kam_set_stats.cpp rename to Player.cpp index 16c92f013343a85e135072c077d85631ca5ccbf4..c97940977607c2bbabd5e9ce00a8a55dda10a70c 100644 --- a/Kam_set_stats.cpp +++ b/Player.cpp @@ -1,32 +1,12 @@ // Random Stat Generator and Player Class +#include "Player.h" #include #include #include using namespace std; -class Player { - private: - int fight = 10, - flee = 10, - talk = 10, - health = 100; - string playerName; - public: - // Get Functions - int getFight() { return fight; } - int getFlee() { return flee; } - int getTalk() { return talk; } - int getHealth() { return health; } - string getPlayerName() { return playerName; } - - // Set Functions - void setStats(int); - int setFight(int Fight) { fight = Fight; } - int setFlee(int Flee) { flee = Flee; } - int setTalk(int Talk) { talk = Talk; } - int setPlayerName(string name) { playerName = name; } -}; + int main() { @@ -35,8 +15,6 @@ int main() { Player player; string name = player.getPlayerName(); - // Enter Seed - //cin >> seed; // Set Stats player.setStats(seed); diff --git a/Player.h b/Player.h new file mode 100644 index 0000000000000000000000000000000000000000..cf3918b9dc48bbdb9fe7fc3b1cbad01c040c5db8 --- /dev/null +++ b/Player.h @@ -0,0 +1,28 @@ +// Header File for the Player Class + +#include +#include +using namespace std; + +class Player { + private: + int fight = 10, + flee = 10, + talk = 10, + health = 100; + string playerName; + public: + // Get Functions + int getFight() { return fight; } + int getFlee() { return flee; } + int getTalk() { return talk; } + int getHealth() { return health; } + string getPlayerName() { return playerName; } + + // Set Functions + void setStats(int); + int setFight(int Fight) { fight = Fight; } + int setFlee(int Flee) { flee = Flee; } + int setTalk(int Talk) { talk = Talk; } + int setPlayerName(string name) { playerName = name; } +}; \ No newline at end of file