mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[minor] formating
This commit is contained in:
parent
fed81ba45d
commit
122c225248
2 changed files with 8 additions and 6 deletions
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue