Add PokemonParty class.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-02-17 16:05:03 +01:00
parent f9f83f892d
commit 6fff01a994
2 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
#ifndef PKMNLIB_POKEMONPARTY_HPP
#define PKMNLIB_POKEMONPARTY_HPP
#include <CreatureLib/Battling/Models/CreatureParty.hpp>
#include <utility>
#include "Pokemon.hpp"
namespace PkmnLib::Battling {
class PokemonParty : public CreatureLib::Battling::CreatureParty {
public:
PokemonParty(std::vector<CreatureLib::Battling::Creature*> party)
: CreatureLib::Battling::CreatureParty(std::move(party)) {}
PokemonParty(std::initializer_list<CreatureLib::Battling::Creature*> party)
: CreatureLib::Battling::CreatureParty(party) {}
Pokemon* GetAtIndex(int index) const {
return dynamic_cast<Pokemon*>(CreatureLib::Battling::CreatureParty::GetAtIndex(index));
}
};
}
#endif // PKMNLIB_POKEMONPARTY_HPP