From 23a8bcdeb498179a35ef4bc9d0f20abfdc54932f Mon Sep 17 00:00:00 2001 From: punchready Date: Fri, 4 Jun 2021 06:42:16 +0200 Subject: [PATCH] fix: properly create random values for characters --- .../gamelibrary/gamelogic/BaseGameLogicTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/java/uulm/teamname/marvelous/gamelibrary/gamelogic/BaseGameLogicTest.java b/src/test/java/uulm/teamname/marvelous/gamelibrary/gamelogic/BaseGameLogicTest.java index ea7539a..447f7a5 100644 --- a/src/test/java/uulm/teamname/marvelous/gamelibrary/gamelogic/BaseGameLogicTest.java +++ b/src/test/java/uulm/teamname/marvelous/gamelibrary/gamelogic/BaseGameLogicTest.java @@ -68,12 +68,12 @@ public class BaseGameLogicTest { props.name = generateName(10); - props.HP = Math.abs(randomIntegers.next() % 15 + 5); - props.MP = Math.abs(randomIntegers.next() % 5 + 2); - props.AP = Math.abs(randomIntegers.next() % 5 + 2); - props.meleeDamage = Math.abs(randomIntegers.next() % 5 + 2); - props.rangedDamage = Math.abs(randomIntegers.next() % 5 + 2); - props.attackRange = Math.abs(randomIntegers.next() % 5 + 2); + props.HP = Math.abs(randomIntegers.next() % 15) + 5; + props.MP = Math.abs(randomIntegers.next() % 5) + 2; + props.AP = Math.abs(randomIntegers.next() % 5) + 2; + props.meleeDamage = Math.abs(randomIntegers.next() % 5) + 2; + props.rangedDamage = Math.abs(randomIntegers.next() % 5) + 2; + props.attackRange = Math.abs(randomIntegers.next() % 5) + 2; return props; }