From 9d6b61f41a6df8e86126f6a32c1d0709cb44665c Mon Sep 17 00:00:00 2001 From: Ashwin Harikrishna Date: Thu, 17 Oct 2024 11:54:29 +1000 Subject: [PATCH] time --- .../src/main/com/csse3200/game/services/DayNightService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/services/DayNightService.java b/source/core/src/main/com/csse3200/game/services/DayNightService.java index 8e80312b..f142c4ff 100644 --- a/source/core/src/main/com/csse3200/game/services/DayNightService.java +++ b/source/core/src/main/com/csse3200/game/services/DayNightService.java @@ -70,7 +70,7 @@ public DayNightService(EventHandler enddayEventHandler, EventHandler docketServi day = 1; } - randomChoice = random.nextInt(10) * 1000; + randomChoice = random.nextInt(60) * 1000; create(); } @@ -140,7 +140,8 @@ public void update() { if (currentTime - lastUpgradeCheck >= randomChoice && !pastUpgrade) { pastUpgrade = true; enddayEventHandler.trigger("upgrade"); - randomChoice = random.nextInt((int) SEVENTY_FIVE_PERCENT); + // randomChoice = random.nextInt((int) SEVENTY_FIVE_PERCENT); + randomChoice = random.nextInt(60) * 1000; } if (this.timeRemaining <= 0 && !endOfDayTriggered) {