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

View file

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