modified: js/config.js
modified: js/game.js
This commit is contained in:
@ -6,7 +6,7 @@ var CONFIG = {
|
|||||||
|
|
||||||
// Initial values
|
// Initial values
|
||||||
INITIAL_BLACK_HOLE_MASS: 42, // in solar masses
|
INITIAL_BLACK_HOLE_MASS: 42, // in solar masses
|
||||||
INITIAL_BLACK_HOLE_RADIUS: 21,
|
INITIAL_BLACK_HOLE_RADIUS: 14,
|
||||||
|
|
||||||
// Performance
|
// Performance
|
||||||
LOGIC_INTERVAL: 10,
|
LOGIC_INTERVAL: 10,
|
||||||
|
|||||||
@ -507,8 +507,7 @@ var Game = (function() {
|
|||||||
calculateConsumptionRates(state, CONFIG, consumedMassKg);
|
calculateConsumptionRates(state, CONFIG, consumedMassKg);
|
||||||
|
|
||||||
// Grow black hole radius
|
// Grow black hole radius
|
||||||
var solarMasses = state.blackHoleTotalMass / CONFIG.SOLAR_MASS_KG;
|
blackHole.radius = (state.blackHoleTotalMass / CONFIG.SOLAR_MASS_KG) * 0.333;
|
||||||
blackHole.radius = CONFIG.INITIAL_BLACK_HOLE_RADIUS + (solarMasses - CONFIG.INITIAL_BLACK_HOLE_MASS);
|
|
||||||
|
|
||||||
blackHole.consumeAsteroid(asteroids[i]);
|
blackHole.consumeAsteroid(asteroids[i]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user