Peoplemon  0.1.0
Peoplemon 3 game source documentation
Peopledex.hpp
Go to the documentation of this file.
1 #ifndef CORE_PLAYER_PEOPLEDEX_HPP
2 #define CORE_PLAYER_PEOPLEDEX_HPP
3 
4 #include <Core/Peoplemon/Id.hpp>
5 #include <string>
6 #include <unordered_map>
7 
8 namespace core
9 {
10 namespace system
11 {
12 class Player;
13 }
14 namespace player
15 {
16 struct State;
17 
24 class Peopledex {
25 public:
28 
34  Peopledex(State& playerState);
35 
42  unsigned int getSeen(pplmn::Id peoplemon) const;
43 
50  unsigned int getCaught(pplmn::Id peoplemon) const;
51 
58  const std::string& getFirstSeenLocation(pplmn::Id peoplemon) const;
59 
66  IntelLevel getIntelLevel(pplmn::Id peoplemon) const;
67 
74  void registerSighting(pplmn::Id peoplemon, const std::string& location);
75 
76 private:
77  State& playerState;
78  std::unordered_map<pplmn::Id, std::uint32_t> seenCounts;
79  std::unordered_map<pplmn::Id, std::string> firstSawLocations;
80 
81  friend class system::Player;
82 };
83 } // namespace player
84 } // namespace core
85 
86 #endif
Id
The id of a peoplemon.
Definition: Id.hpp:16
Core classes and functionality for both the editor and game.
Maintains the information required to populate the peopledex.
Definition: Peopledex.hpp:24
void registerSighting(pplmn::Id peoplemon, const std::string &location)
Registers a sighting of the given peoplemon at the given location.
Definition: Peopledex.cpp:49
const std::string & getFirstSeenLocation(pplmn::Id peoplemon) const
Returns the name of the location the given peoplemon was first spotted at.
Definition: Peopledex.cpp:17
IntelLevel getIntelLevel(pplmn::Id peoplemon) const
Returns the level of intel on the given peoplemon.
Definition: Peopledex.cpp:42
unsigned int getSeen(pplmn::Id peoplemon) const
Returns how many of the given peoplemon have been seen.
Definition: Peopledex.cpp:12
unsigned int getCaught(pplmn::Id peoplemon) const
Returns how many of the given peoplemon have been caught.
Definition: Peopledex.cpp:26
Peopledex(State &playerState)
Construct a new Peopledex object.
Definition: Peopledex.cpp:9
IntelLevel
Represents an intel level on a given peoplemon.
Definition: Peopledex.hpp:27
Stores all player state.
Definition: State.hpp:21
Primary system for managing the player and their data.
Definition: Player.hpp:35