MCPcopy Create free account
hub / github.com/devosoft/avida / Inst_IfNotTarget

Method Inst_IfNotTarget

avida-core/source/cpu/cHardwareCPU.cc:9135–9150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9133
9134
9135bool cHardwareCPU::Inst_IfNotTarget(cAvidaContext&)
9136{
9137 int cellid = m_organism->GetCellID(); //absolute id of current cell
9138
9139 if (cellid == -1) {
9140 return true;
9141 }
9142
9143 int cell_data = m_world->GetPopulation().GetCell(cellid).GetCellData();
9144
9145 if (cell_data > 0) {
9146 getIP().Advance();
9147 }
9148
9149 return true;
9150} //End Inst_IfNotTarget()
9151
9152
9153bool cHardwareCPU::Inst_IfPheromone(cAvidaContext& ctx)

Callers

nothing calls this directly

Calls 4

GetCellIDMethod · 0.45
GetCellDataMethod · 0.45
GetCellMethod · 0.45
AdvanceMethod · 0.45

Tested by

no test coverage detected