mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
[minor] formating
This commit is contained in:
parent
fed81ba45d
commit
122c225248
2 changed files with 8 additions and 6 deletions
|
@ -60,12 +60,12 @@ 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()) {
|
||||
|
|
|
@ -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