Updated sliders to use default values on load instead of the previous hardcoded defaults
This commit is contained in:
parent
e7623335d3
commit
b56f6cf490
27
script.js
27
script.js
|
|
@ -509,6 +509,33 @@ function wireUIEvents() {
|
||||||
|
|
||||||
const fastForwardBtn = document.getElementById('fastForwardButton');
|
const fastForwardBtn = document.getElementById('fastForwardButton');
|
||||||
if (fastForwardBtn) fastForwardBtn.onclick = fastForwardSimulation;
|
if (fastForwardBtn) fastForwardBtn.onclick = fastForwardSimulation;
|
||||||
|
|
||||||
|
updateControlValue('foodPointsVal', DEFAULT_FOOD_POINTS);
|
||||||
|
updateControlValue('droppedFoodPointsVal', DEFAULT_DROPPED_FOOD_POINTS);
|
||||||
|
updateControlValue('killBonusVal', DEFAULT_KILL_BONUS);
|
||||||
|
|
||||||
|
updateControlValue('survivalBonusVal', DEFAULT_SURVIVAL_BONUS);
|
||||||
|
updateControlValue('lengthBonusVal', DEFAULT_LENGTH_BONUS);
|
||||||
|
|
||||||
|
|
||||||
|
updateControlValue('maxFoodVal', DEFAULT_MAX_FOOD);
|
||||||
|
updateControlValue('spawnChanceVal', DEFAULT_SPAWN_CHANCE);
|
||||||
|
updateControlValue('bodyLengthIncVal', DEFAULT_BODY_LENGTH_INCREMENT);
|
||||||
|
updateControlValue('thicknessIncVal', DEFAULT_THICKNESS_INCREMENT);
|
||||||
|
|
||||||
|
updateControlValue('snakeCountVal', DEFAULT_SNAKE_COUNT);
|
||||||
|
updateControlValue('snakeSpeedVal', DEFAULT_SNAKE_SPEED);
|
||||||
|
updateControlValue('brainSizeVal', DEFAULT_BRAIN_SIZE);
|
||||||
|
|
||||||
|
updateControlValue('turnRateVal', DEFAULT_TURN_RATE);
|
||||||
|
updateControlValue('boostCostVal', DEFAULT_BOOST_COST);
|
||||||
|
updateControlValue('boostMultiplierVal', DEFAULT_BOOST_MULTIPLIER);
|
||||||
|
|
||||||
|
updateControlValue('mutationRateVal', DEFAULT_MUTATION_RATE);
|
||||||
|
updateControlValue('crossoverBiasVal', DEFAULT_CROSSOVER_BIAS);
|
||||||
|
updateControlValue('respawnDelayVal', DEFAULT_RESPAWN_DELAY);
|
||||||
|
updateControlValue('foodDecayTimeVal', DEFAULT_FOOD_DECAY_TIME);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Adjust snake population */
|
/* Adjust snake population */
|
||||||
|
|
|
||||||
|
|
@ -263,7 +263,7 @@ canvas {
|
||||||
|
|
||||||
/* Loading overlay for fast-forward */
|
/* Loading overlay for fast-forward */
|
||||||
#loadingOverlay {
|
#loadingOverlay {
|
||||||
position: absolute;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -299,7 +299,7 @@ canvas {
|
||||||
box-shadow: 0 0 8px rgba(255,0,255,0.5);
|
box-shadow: 0 0 8px rgba(255,0,255,0.5);
|
||||||
}
|
}
|
||||||
.help-button:hover {
|
.help-button:hover {
|
||||||
background: #666;
|
background: #667;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Help Modal Overlay */
|
/* Help Modal Overlay */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue