Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
4003cem-polymorphism_orig/npc.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
28 lines (23 sloc)
620 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef NPC_H | |
#define NPC_H | |
#include "entity.h" | |
#include "player.h" | |
/** | |
* The Player class represents all non playable characters | |
* It intended for inheritance by other classes that implement | |
* the actual behaviour of the various different creatures | |
*/ | |
class NPC : public Entity | |
{ | |
public: | |
/* since this class's constructor is just | |
going to call the parent constructor, | |
use the parent constructor directly */ | |
using Entity::Entity; | |
/** Run the encounter action for this NPC and a | |
* given player. | |
* @param[player] Player object to encounter | |
*/ | |
virtual void encounter( Player& player ) = 0; | |
}; | |
#endif |