From 32b09cd05977ad7bb84e2865aceaf22b39916ee3 Mon Sep 17 00:00:00 2001 From: Arne Keller Date: Fri, 13 Mar 2020 08:53:17 +0100 Subject: [PATCH] Correctly parse integer parameters --- src/edu/kit/informatik/cardgame/ui/command/RollDice.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/edu/kit/informatik/cardgame/ui/command/RollDice.java b/src/edu/kit/informatik/cardgame/ui/command/RollDice.java index 7d334b4..0c3ae6f 100644 --- a/src/edu/kit/informatik/cardgame/ui/command/RollDice.java +++ b/src/edu/kit/informatik/cardgame/ui/command/RollDice.java @@ -11,7 +11,7 @@ import java.util.regex.Pattern; import static edu.kit.informatik.cardgame.ui.command.CommandFactory.ROLL_DICE; public final class RollDice extends Command { - private static final Pattern ROLL_DICE_ARGUMENTS = Pattern.compile(ROLL_DICE + "(\\d) (\\d)"); + private static final Pattern ROLL_DICE_ARGUMENTS = Pattern.compile(ROLL_DICE + "\\+?(\\d+) \\+?(\\d+)"); private int size;