From 39907854f2851f72f8d71e69aa2e5067a776905a Mon Sep 17 00:00:00 2001 From: Baptiste Date: Thu, 7 Dec 2023 09:03:23 +0100 Subject: [PATCH] default health --- js/class.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/class.js b/js/class.js index 05b9a29..0b3a632 100644 --- a/js/class.js +++ b/js/class.js @@ -4,6 +4,7 @@ const playerSize = 50.; const playerSpeed=.2; const bulletSpeed=playerSpeed*2; const halfSqrtTwo=0.70710678118; +const defaulthealth=10 class Player { @@ -24,7 +25,7 @@ class Player //7=West //8=North-West this.ammo=10; - this.health=10; + this.health=defaulthealth; this.kill=0; this.death=0; }