From d5a010727cfa0399fece6734b4dfc86fee73f24e Mon Sep 17 00:00:00 2001 From: elioat Date: Sun, 20 Oct 2024 19:21:09 -0400 Subject: * --- html/broughlike/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'html/broughlike/index.html') diff --git a/html/broughlike/index.html b/html/broughlike/index.html index 335fa89..9afeb07 100644 --- a/html/broughlike/index.html +++ b/html/broughlike/index.html @@ -43,6 +43,7 @@ const PLAYER_MAX_HEALTH = 12; const PLAYER_BASE_DAMAGE = 1; const ENEMY_CHASE_DISTANCE = 4; + const MAX_ENEMIES_ON_LEVEL = 4; const MAX_ENEMY_HEALTH = 7; const MIN_ENEMY_HEALTH = 2; const WALLS_MIN = 5; @@ -91,7 +92,7 @@ function generateEnemies() { enemies = []; - const numEnemies = Math.floor(Math.random() * 3); // Between 0 and 2 enemies, FIXME consider making this a tunable constant + const numEnemies = Math.floor(Math.random() * (MAX_ENEMIES_ON_LEVEL + 1)); // Between 0 and the constant value. for (let i = 0; i < numEnemies; i++) { let enemyX, enemyY; do { -- cgit 1.4.1-2-gfad0