| 3636 | } |
| 3637 | |
| 3638 | bool cHardwareCPU::Inst_SmartExplode(cAvidaContext& ctx) |
| 3639 | { |
| 3640 | if (GetRegister(FindModifiedRegister(REG_AX))){ |
| 3641 | // execute explode chance |
| 3642 | m_organism->GetPhenotype().SetKaboomExecuted(true); |
| 3643 | //Case where both Probability and Hamming Distance are static |
| 3644 | double percent_prob = (double) m_world->GetConfig().KABOOM_PROB.Get(); |
| 3645 | int distance = (int) m_world->GetConfig().KABOOM_HAMMING.Get(); |
| 3646 | if ( ctx.GetRandom().P(percent_prob) ) m_organism->Kaboom(distance, ctx); |
| 3647 | } else { |
| 3648 | m_world->GetStats().IncDontExplode(); |
| 3649 | } |
| 3650 | return true; |
| 3651 | } |
| 3652 | |
| 3653 | |
| 3654 | bool cHardwareCPU::Inst_Lyse(cAvidaContext& ctx) |
nothing calls this directly
no test coverage detected