mirror of
https://gitlab.com/arnekeller/kit-programmieren-ws1920-final2.git
synced 2024-11-24 01:15:03 +00:00
Correctly parse integer parameters
This commit is contained in:
parent
4232c7b14e
commit
32b09cd059
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user