about summary refs log tree commit diff stats
path: root/html/broughlike/index.html
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-10-20 19:21:09 -0400
committerelioat <elioat@tilde.institute>2024-10-20 19:21:09 -0400
commitd5a010727cfa0399fece6734b4dfc86fee73f24e (patch)
treed94921f9f2ecef19b1fe85eabe8ee1342d27dec6 /html/broughlike/index.html
parent8ae93000597f0d14503d7af42e3d6f5e9c15632e (diff)
downloadtour-d5a010727cfa0399fece6734b4dfc86fee73f24e.tar.gz
*
Diffstat (limited to 'html/broughlike/index.html')
-rw-r--r--html/broughlike/index.html3
1 files changed, 2 insertions, 1 deletions
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 {