Moved observer attachment into CStack.java

This commit is contained in:
Maxmtg
2013-05-26 18:09:53 +00:00
parent 442e9bb667
commit 2031691ed3
2 changed files with 2 additions and 1 deletions

View File

@@ -371,7 +371,6 @@ public enum FControl {
// models shall notify controllers of changes // models shall notify controllers of changes
game.getStack().addObserver(CStack.SINGLETON_INSTANCE);
game.getGameLog().addObserver(CLog.SINGLETON_INSTANCE); game.getGameLog().addObserver(CLog.SINGLETON_INSTANCE);
// some observers were set in CMatchUI.initMatch // some observers were set in CMatchUI.initMatch

View File

@@ -64,6 +64,8 @@ public enum CStack implements ICDoc, Observer {
public void setModel(MagicStack model, LobbyPlayer guiPlayer) { public void setModel(MagicStack model, LobbyPlayer guiPlayer) {
this.model = model; this.model = model;
this.viewer = guiPlayer; this.viewer = guiPlayer;
model.addObserver(this);
} }
} }