Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Types | Public Member Functions | Friends | List of all members
core::player::Peopledex Class Reference

Maintains the information required to populate the peopledex. More...

#include <Peopledex.hpp>

Public Types

enum  IntelLevel { NoIntel , LimitedIntel , FullIntel }
 Represents an intel level on a given peoplemon. More...
 

Public Member Functions

 Peopledex (State &playerState)
 Construct a new Peopledex object. More...
 
unsigned int getSeen (pplmn::Id peoplemon) const
 Returns how many of the given peoplemon have been seen. More...
 
unsigned int getCaught (pplmn::Id peoplemon) const
 Returns how many of the given peoplemon have been caught. More...
 
const std::string & getFirstSeenLocation (pplmn::Id peoplemon) const
 Returns the name of the location the given peoplemon was first spotted at. More...
 
IntelLevel getIntelLevel (pplmn::Id peoplemon) const
 Returns the level of intel on the given peoplemon. More...
 
void registerSighting (pplmn::Id peoplemon, const std::string &location)
 Registers a sighting of the given peoplemon at the given location. More...
 

Friends

class system::Player
 

Detailed Description

Maintains the information required to populate the peopledex.

Definition at line 24 of file Peopledex.hpp.

Member Enumeration Documentation

◆ IntelLevel

Represents an intel level on a given peoplemon.

Enumerator
NoIntel 
LimitedIntel 
FullIntel 

Definition at line 27 of file Peopledex.hpp.

Constructor & Destructor Documentation

◆ Peopledex()

core::player::Peopledex::Peopledex ( State playerState)

Construct a new Peopledex object.

Parameters
playerStateThe player state

Definition at line 9 of file Peopledex.cpp.

Member Function Documentation

◆ getCaught()

unsigned int core::player::Peopledex::getCaught ( pplmn::Id  peoplemon) const

Returns how many of the given peoplemon have been caught.

Parameters
peoplemonThe peoplemon to search for
Returns
unsigned int The amount caught

Definition at line 26 of file Peopledex.cpp.

◆ getFirstSeenLocation()

const std::string & core::player::Peopledex::getFirstSeenLocation ( pplmn::Id  peoplemon) const

Returns the name of the location the given peoplemon was first spotted at.

Parameters
peoplemonThe peoplemon to search
Returns
const std::string& The location first seen at. May be empty

Definition at line 17 of file Peopledex.cpp.

◆ getIntelLevel()

Peopledex::IntelLevel core::player::Peopledex::getIntelLevel ( pplmn::Id  peoplemon) const

Returns the level of intel on the given peoplemon.

Parameters
peoplemonThe peoplemon to get the intel level on
Returns
IntelLevel The intel level on the given peoplemon

Definition at line 42 of file Peopledex.cpp.

◆ getSeen()

unsigned int core::player::Peopledex::getSeen ( pplmn::Id  peoplemon) const

Returns how many of the given peoplemon have been seen.

Parameters
peoplemonThe peoplemon to search for
Returns
unsigned int The amount seen

Definition at line 12 of file Peopledex.cpp.

◆ registerSighting()

void core::player::Peopledex::registerSighting ( pplmn::Id  peoplemon,
const std::string &  location 
)

Registers a sighting of the given peoplemon at the given location.

Parameters
peoplemonThe peoplemon that was seen
locationWhere the peoplemon was seen

Definition at line 49 of file Peopledex.cpp.

Friends And Related Function Documentation

◆ system::Player

friend class system::Player
friend

Definition at line 81 of file Peopledex.hpp.


The documentation for this class was generated from the following files: