[minor] formating

This commit is contained in:
LevelX2 2013-04-17 17:34:26 +02:00
parent fed81ba45d
commit 122c225248
2 changed files with 8 additions and 6 deletions

View file

@ -60,15 +60,15 @@ public class PermanentToken extends PermanentImpl<PermanentToken> {
@Override
public void reset(Game game) {
Token copy = token.copy();
copyFromToken(copy, game);
Token tokenCopy = token.copy();
copyFromToken(tokenCopy, game);
super.reset(game);
}
protected void copyFromToken(Token token, Game game) {
private void copyFromToken(Token token, Game game) {
this.name = token.getName();
this.abilities.clear();
for (Ability ability: token.getAbilities()) {
for (Ability ability : token.getAbilities()) {
this.addAbility(ability, game);
}
this.manaCost.clear();

View file

@ -42,15 +42,17 @@ public class CopyFunction implements Function<Card, Card> {
protected Game game;
public CopyFunction(Card target) {
if (target == null)
if (target == null) {
throw new IllegalArgumentException("Target can't be null");
}
this.target = target;
}
@Override
public Card apply(Card source) {
if (target == null)
if (target == null) {
throw new IllegalArgumentException("Target can't be null");
}
target.setName(source.getName());
target.getColor().setColor(source.getColor());