| 7210 | } |
| 7211 | |
| 7212 | Apto::Array<cOrganism*> cHardwareExperimental::GetPredGroupAttackNeighbors() |
| 7213 | { |
| 7214 | Apto::Array<int> neighborhood; |
| 7215 | Apto::Array<cOrganism*> pack; |
| 7216 | pack.Push(m_organism); |
| 7217 | if (!m_use_avatar) { |
| 7218 | m_organism->GetOrgInterface().GetNeighborhoodCellIDs(neighborhood); |
| 7219 | for (int j = 0; j < neighborhood.GetSize(); j++) { |
| 7220 | if (m_organism->GetOrgInterface().GetCell(neighborhood[j])->IsOccupied() && |
| 7221 | !m_organism->GetOrgInterface().GetCell(neighborhood[j])->GetOrganism()->IsDead()) { |
| 7222 | if (!m_organism->GetOrgInterface().GetCell(neighborhood[j])->GetOrganism()->IsPreyFT()) { |
| 7223 | pack.Push(m_organism->GetOrgInterface().GetCell(neighborhood[j])->GetOrganism()); |
| 7224 | } |
| 7225 | } |
| 7226 | } |
| 7227 | } |
| 7228 | else { |
| 7229 | m_organism->GetOrgInterface().GetAVNeighborhoodCellIDs(neighborhood); |
| 7230 | for (int j = 0; j < neighborhood.GetSize(); j++) { |
| 7231 | if (m_organism->GetOrgInterface().GetCell(neighborhood[j])->HasPredAV()) { |
| 7232 | Apto::Array<cOrganism*> predators = m_organism->GetOrgInterface().GetCell(neighborhood[j])->GetCellInputAVs(); |
| 7233 | for (int i = 0; i < predators.GetSize(); i++) { |
| 7234 | if (!predators[i]->IsDead() && !predators[i]->IsPreyFT()) pack.Push(predators[i]); |
| 7235 | } |
| 7236 | } |
| 7237 | } |
| 7238 | } |
| 7239 | return pack; |
| 7240 | } |
| 7241 | |
| 7242 | Apto::Array<cOrganism*> cHardwareExperimental::GetPredSameGroupAttackNeighbors() |
| 7243 | { |
nothing calls this directly
no test coverage detected