src/scripts/tiles/control_rod.js
// Randomly absorb a neutron if control rod is down
Randomly absorb a neutron if control rod is down
Randomly absorb a neutron if control rod is down
onReact(n) {
        if ((random(100) / 100 < CONFIG.controlRodChance) && (this.simulation.controlRods)) {
            this.simulation.glow(n.pos.x, n.pos.y, {
                r: 255,
                g: 255,
                b: 255
            });
            this.simulation.removeNeutron(n);
            this.heat += CONFIG.controlRodHeat;
            return true;
        }
    }
onReact ( n ) { if ( ( random ( 100 ) / 100 < CONFIG . controlRodChance ) && ( this . simulation . controlRods ) ) { this . simulation . glow ( n . pos . x , n . pos . y , { r : 255 , g : 255 , b : 255 } ) ; this . simulation . removeNeutron ( n ) ; this . heat += CONFIG . controlRodHeat ; return true ; } }
Randomly absorb a neutron if control rod is down
Randomly absorb a neutron if control rod is down