- Updating Label observers after a ChangeZone

This commit is contained in:
Sol
2012-02-12 16:55:23 +00:00
parent 9ee6024f6b
commit e256073f22
2 changed files with 13 additions and 0 deletions

View File

@@ -111,6 +111,10 @@ public class GameAction {
public static Card changeZone(final PlayerZone prev, final PlayerZone zone, final Card c) {
if ((prev == null) && !c.isToken()) {
zone.add(c);
Player p = zone.getPlayer();
if (p != null){
p.updateLabelObservers();
}
return c;
}
@@ -191,6 +195,11 @@ public class GameAction {
prev.remove(c);
}
Player p = zone.getPlayer();
if (p != null){
p.updateLabelObservers();
}
final HashMap<String, Object> runParams = new HashMap<String, Object>();
runParams.put("Card", lastKnownInfo);
if (prev != null) {

View File

@@ -2734,6 +2734,10 @@ public abstract class Player extends GameEntity {
return this.mustAttackEntity;
}
public final void updateLabelObservers() {
this.getZone(Zone.Hand).updateObservers();
}
// //////////////////////////////
//
// generic Object overrides