MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / numCreaturesInHand

Method numCreaturesInHand

source/game/Player.cpp:82–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82unsigned int Player::numCreaturesInHand(const Seat* seat) const
83{
84 unsigned int cpt = 0;
85 for(GameEntity* entity : mObjectsInHand)
86 {
87 if(entity->getObjectType() != GameEntityType::creature)
88 continue;
89
90 if(seat != nullptr && entity->getSeat() != seat)
91 continue;
92
93 ++cpt;
94 }
95 return cpt;
96}
97
98unsigned int Player::numObjectsInHand() const
99{

Callers

nothing calls this directly

Calls 2

getObjectTypeMethod · 0.45
getSeatMethod · 0.45

Tested by

no test coverage detected