Created
September 29, 2012 15:25
-
-
Save schoettl/3804349 to your computer and use it in GitHub Desktop.
A setter for views to set data models
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void setGameState(GameState gameState) { | |
if (gameState != this.gameState) { | |
if (this.gameState != null) { | |
// unregister listeners/observers | |
} | |
this.gameState = gameState; | |
if (gameState != null) { | |
// register listeners/observers | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment