cppmud/src/include/player.hpp

107 lines
3.3 KiB
C++

/*
* =====================================================================================
*
* Filename: player.hpp
*
* Description: Describing players
*
* Version: 1.0
* Created: 01/26/2024 06:03:40 PM
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Organization:
*
* =====================================================================================
*/
/*
* =====================================================================================
* Class: GameObject
* Description: Represents some thing in the game
* =====================================================================================
*/
class GameObject
{
public:
/* ==================== LIFECYCLE ======================================= */
GameObject (); /* constructor */
/* ==================== ACCESSORS ======================================= */
/* ==================== MUTATORS ======================================= */
/* ==================== OPERATORS ======================================= */
protected:
/* ==================== DATA MEMBERS ======================================= */
std::string location;
std::string name;
private:
/* ==================== DATA MEMBERS ======================================= */
}; /* ----- end of class GameObject ----- */
/*
* =====================================================================================
* Class: Entity
* Description: Describes a "sentient" object in the game
* =====================================================================================
*/
class Entity : public GameObject
{
public:
/* ==================== LIFECYCLE ======================================= */
Entity (); /* constructor */
/* ==================== ACCESSORS ======================================= */
/* ==================== MUTATORS ======================================= */
/* ==================== OPERATORS ======================================= */
protected:
/* ==================== DATA MEMBERS ======================================= */
int hp; /* hit points remaining */
int level; /* level, affects scaling */
private:
/* ==================== DATA MEMBERS ======================================= */
}; /* ----- end of class Player ----- */
/*
* =====================================================================================
* Class: Item
* Description: Represents a non-sentient object in the game
* =====================================================================================
*/
class Item : public GameObject
{
public:
/* ==================== LIFECYCLE ======================================= */
Item (); /* constructor */
/* ==================== ACCESSORS ======================================= */
/* ==================== MUTATORS ======================================= */
/* ==================== OPERATORS ======================================= */
protected:
/* ==================== DATA MEMBERS ======================================= */
private:
/* ==================== DATA MEMBERS ======================================= */
}; /* ----- end of class Item ----- */