forked from External/mage
refactor the copy functionality for no-args watchers
This commit is contained in:
parent
311532a6e7
commit
6703ba693d
52 changed files with 73 additions and 538 deletions
|
|
@ -24,12 +24,6 @@ public class PlayerGainedLifeWatcher extends Watcher {
|
|||
super(WatcherScope.GAME);
|
||||
}
|
||||
|
||||
private PlayerGainedLifeWatcher(final PlayerGainedLifeWatcher watcher) {
|
||||
super(watcher);
|
||||
for (Entry<UUID, Integer> entry : watcher.amountOfLifeGainedThisTurn.entrySet()) {
|
||||
amountOfLifeGainedThisTurn.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void watch(GameEvent event, Game game) {
|
||||
|
|
@ -54,9 +48,4 @@ public class PlayerGainedLifeWatcher extends Watcher {
|
|||
super.reset();
|
||||
amountOfLifeGainedThisTurn.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayerGainedLifeWatcher copy() {
|
||||
return new PlayerGainedLifeWatcher(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue