Add PokemonParty class.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
21
src/Battling/Pokemon/PokemonParty.hpp
Normal file
21
src/Battling/Pokemon/PokemonParty.hpp
Normal 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
|
||||
Reference in New Issue
Block a user