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

Method Inst_IfCellDataChanged

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

! Detect if the cell data in which this organism lives has changed since the last time that this organism has collected cell data. Note that this process DOES NOT take into account organism movement, and it only works with explicit collection of cell data. */

Source from the content-addressed store, hash-verified

9383 collection of cell data.
9384 */
9385bool cHardwareCPU::Inst_IfCellDataChanged(cAvidaContext&)
9386{
9387 assert(m_organism != 0);
9388 // If we haven't collected cell data yet, or it's the same as the current cell data, advance
9389 // the IP:
9390 if (!m_last_cell_data.first || (m_last_cell_data.second == m_organism->GetCellData())) {
9391 getIP().Advance();
9392 }
9393
9394 return true;
9395}
9396
9397
9398bool cHardwareCPU::Inst_KillCellEvent(cAvidaContext&)

Callers

nothing calls this directly

Calls 2

GetCellDataMethod · 0.45
AdvanceMethod · 0.45

Tested by

no test coverage detected