1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-06 01:04:10 -09:00

MageInt.EmptyMageInt made immutable

This commit is contained in:
North 2012-03-28 22:29:27 +03:00
parent 775b3276c9
commit 03bbc73564

View file

@ -33,8 +33,21 @@ import mage.util.Copyable;
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 String cardValue = "";