mirror of
https://github.com/correl/mage.git
synced 2025-04-13 01:01:11 -09:00
MageInt.EmptyMageInt made immutable
This commit is contained in:
parent
775b3276c9
commit
03bbc73564
1 changed files with 15 additions and 2 deletions
|
@ -33,8 +33,21 @@ import mage.util.Copyable;
|
||||||
|
|
||||||
public class MageInt implements Serializable, Copyable<MageInt> {
|
public class MageInt implements Serializable, Copyable<MageInt> {
|
||||||
|
|
||||||
public static MageInt EmptyMageInt = new MageInt(Integer.MIN_VALUE, null);
|
public static MageInt EmptyMageInt = new MageInt(Integer.MIN_VALUE, null) {
|
||||||
|
|
||||||
|
private static final String exceptionMessage = "MageInt.EmptyMageInt can't be modified.";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void boostValue(int amount) {
|
||||||
|
throw new RuntimeException(exceptionMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setValue(int value) {
|
||||||
|
throw new RuntimeException(exceptionMessage);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
protected int baseValue;
|
protected int baseValue;
|
||||||
protected String cardValue = "";
|
protected String cardValue = "";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue