Sonar fixes

remove the deprecated GameState.getWatchers()
This commit is contained in:
Ingmar Goudt 2019-02-02 22:09:55 +01:00
parent 90bf7bd18c
commit 63718e7a6e
28 changed files with 70 additions and 72 deletions

View file

@ -531,11 +531,6 @@ public class GameState implements Serializable, Copyable<GameState> {
return this.turnMods;
}
@Deprecated
public Watchers getWatchers() {
return this.watchers;
}
public <T extends Watcher> T getWatcher(Class<T> watcherClass) {
return watcherClass.cast(watchers.get(watcherClass.getSimpleName()));
}

View file

@ -60,7 +60,7 @@ public abstract class GameTinyLeadersImpl extends GameImpl {
// ability.addEffect(new CommanderManaReplacementEffect(player.getId(), CardUtil.getColorIdentity(commander)));
getState().setValue(commander.getId() + "_castCount", 0);
CommanderInfoWatcher watcher = new CommanderInfoWatcher(commander.getId(), false);
getState().getWatchers().add(watcher);
getState().addWatcher(watcher);
watcher.addCardInfoToCommander(this);
} else {
throw new UnknownError("Commander card could not be created. Name: [" + player.getMatchPlayer().getDeck().getName() + ']');