From f8f73925e3da80bc95ecf6060cc0ca8fa7063ddf Mon Sep 17 00:00:00 2001 From: Wim Wenigerkind Date: Tue, 25 Feb 2025 13:13:28 +0100 Subject: [PATCH] zuul 7 --- src/de/szut/zuul/Game.java | 7 ++++--- src/de/szut/zuul/Player.java | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/de/szut/zuul/Game.java b/src/de/szut/zuul/Game.java index 2e17d58..bbbe6fd 100644 --- a/src/de/szut/zuul/Game.java +++ b/src/de/szut/zuul/Game.java @@ -1,6 +1,5 @@ package de.szut.zuul; -import java.sql.SQLOutput; import java.util.Random; /** @@ -68,7 +67,7 @@ public class Game // add muffins to random rooms Room[] rooms = {marketsquare, templePyramid, tavern, sacrificialSite, hut, jungle, secretPassage, cave, beach, basement, wizardsRoom}; Random random = new Random(); - for (int i = 0; i < 3; i++) { // Add 3 muffins to random rooms + for (int i = 0; i < 3; i++) { int randomIndex = random.nextInt(rooms.length); rooms[randomIndex].putItem(new Item("Muffin", "a delicious muffin", 0.2)); } @@ -113,7 +112,9 @@ public class Game } /** - * Main play routine. Loops until end of play. + * Main play routine. Loops until end of play. + * + * @return */ public void play() { diff --git a/src/de/szut/zuul/Player.java b/src/de/szut/zuul/Player.java index 66f064b..6d92e10 100644 --- a/src/de/szut/zuul/Player.java +++ b/src/de/szut/zuul/Player.java @@ -43,9 +43,8 @@ public class Player { public double getLoadCapacity() { return loadCapacity; } - public double eatMuffin() { + public void eatMuffin() { loadCapacity += new Random().nextInt(11); - return loadCapacity; } private double calculateWeight() {