#include #include #include "StatusT.h" #include "PlayerT.h" #include "GameConstants.h" using namespace std; void PrintName(NameT name){ if (name.title != "") { cout << name.title << " "; } cout << name.first; if (name.last != "") { cout << " " << name.last; } return; } void GetName(NameT & name){ cout << "Enter your title (or just return if you don't have a title): "; getline(cin,name.title); cout << "Enter your first name (or your name if you only have one): "; getline(cin, name.first); cout << "Enter your last name (or just return if you don't have a last name): "; getline(cin, name.last); } void PrintPlayer(PlayerT player){ // the name cout << "Name:" ; PrintName(player.name); cout << endl; cout << "Sanity: " << player.sanity << endl; cout << "Status: " << StatusTToString(player.status) << endl; return; } PlayerT GetPlayer(int & cthulhu){ PlayerT player; GetName(player.name); player.sanity = START_SANITY; cthulhu -= START_SANITY; player.status = StatusT::SANE; return player; }