mirror of
https://github.com/correl/mage.git
synced 2024-12-27 20:06:31 +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
|
@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()) {
|
||||||
|
|
|
@ -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());
|
||||||
|
|
Loading…
Reference in a new issue