Download this source code in text format (Player.h)
/***********************************************************
* WindowMud - Window Mud Server *
* File: Player.h *
* Usage: Defines the Player class *
* *
* No warranty is given or implied. *
* There is no license associated with this code. *
* There are no restrictions on the use of this code. *
* This code may be used in any way the reader wishes. *
* No credit or credits are given and none are required. *
* The reader may take this code and claim they wrote it. *
************************************************************/
#ifndef PLAYER_H
#define PLAYER_H
/***********************************************************
* Includes *
************************************************************/
#include "Config.h"
#include "Dnode.h"
/***********************************************************
* Define Player class *
************************************************************/
class Player
{
// Public functions static
public:
static bool IsPlayer(CString PlayerName);
static int GetCount();
static bool IsNameValid(CString Name);
// Public functions
public:
Player();
~Player();
void CreatePrompt();
CString GetOutput();
int GetWeaponSkill();
void ParsePlayerStuff();
void Save();
// Private functions
private:
void CloseFile();
bool OpenFile(CString Name, CString Mode);
void ReadLine();
void WriteLine(CString Stuff);
// Public variables
public:
// Private variables static
private:
static int Count;
// Private variables
private:
CString Output;
CStdioFile PlayerFile;
CString Stuff;
// Player file variables
public:
CString Name;
CString Password;
CString Sex;
};
#endif