added some info when assert is false

master
melvin 2012-06-18 14:47:50 +08:00
parent 7d7b66444d
commit d587be7bae
1 changed files with 2 additions and 2 deletions

View File

@ -313,7 +313,7 @@ public class MagicPlayer implements MagicTarget {
public void addPermanent(final MagicPermanent permanent) {
boolean added = permanents.add(permanent);
assert added == true;
assert added == true : permanent + " cannot be added to " + this;
if (permanent.producesMana()) {
manaPermanents.add(permanent);
}
@ -323,7 +323,7 @@ public class MagicPlayer implements MagicTarget {
public void removePermanent(final MagicPermanent permanent) {
boolean removed = permanents.remove(permanent);
assert removed == true;
assert removed == true : permanent + " cannot be removed from " + this;
if (permanent.producesMana()) {
manaPermanents.remove(permanent);
}