1 #ifndef CORE_PLAYER_STORAGESYSTEM_HPP
2 #define CORE_PLAYER_STORAGESYSTEM_HPP
58 void remove(
unsigned int box,
const sf::Vector2i& position);
69 const sf::Vector2i& newPos);
79 bool spaceFree(
int box,
int x,
int y)
const;
96 const std::vector<pplmn::StoredPeoplemon>&
getBox(
unsigned int box)
const;
99 std::array<std::vector<pplmn::StoredPeoplemon>,
BoxCount> boxes;
Core classes and functionality for both the editor and game.
Represents an instance of a peoplemon. Can be a wild peoplemon, trainer, or player peoplemon....
Represents a Peoplemon in storage.
Peoplemon storage system for extra peoplemon the player has.
static constexpr int BoxCount
pplmn::StoredPeoplemon * get(unsigned int box, const sf::Vector2i &pos)
Returns the peoplemon at the given position in the given box.
static constexpr int BoxHeight
static constexpr int BoxWidth
pplmn::StoredPeoplemon * move(pplmn::StoredPeoplemon &ppl, unsigned int newBox, const sf::Vector2i &newPos)
Moves the given stored peoplemon from its current location to the new location.
StorageSystem()
Construct a new Storage System.
void remove(unsigned int box, const sf::Vector2i &position)
Clears the peoplemon from the given position, if one is there.
const std::vector< pplmn::StoredPeoplemon > & getBox(unsigned int box) const
Returns the given box. Performs no bounds check.
bool add(const pplmn::OwnedPeoplemon &ppl)
Adds the given peoplemon to storage in a free slot.
bool spaceFree(int box, int x, int y) const
Returns whether or not the given storage space is free.
Primary system for managing the player and their data.