make plane and emblem implement Controllable to give access to the isControlledBy method

This commit is contained in:
Ingmar Goudt 2018-09-30 12:48:03 +02:00
parent e614b8573e
commit fe3f6fb6c8
8 changed files with 13 additions and 11 deletions

View file

@ -2594,7 +2594,7 @@ public abstract class GameImpl implements Game, Serializable {
boolean addPlaneAgain = false;
for (Iterator<CommandObject> it = this.getState().getCommand().iterator(); it.hasNext();) {
CommandObject obj = it.next();
if (obj.getControllerId().equals(playerId)) {
if (obj.isControlledBy(playerId)) {
if (obj instanceof Emblem) {
((Emblem) obj).discardEffects();// This may not be the best fix but it works
}