Correctly parse integer parameters

This commit is contained in:
Arne Keller 2020-03-13 08:53:17 +01:00
parent 4232c7b14e
commit 32b09cd059

View File

@ -11,7 +11,7 @@ import java.util.regex.Pattern;
import static edu.kit.informatik.cardgame.ui.command.CommandFactory.ROLL_DICE; import static edu.kit.informatik.cardgame.ui.command.CommandFactory.ROLL_DICE;
public final class RollDice extends Command { 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; private int size;