cz.cvut.agents.rph.core
Class GameModel
java.lang.Object
cz.cvut.agents.rph.core.GameModel
- Direct Known Subclasses:
- ReversiModel
public abstract class GameModel
- extends java.lang.Object
Model of the game - should store all the data about the game, no GUI no logic here.
Author: Ondrej Vanek
Date: 10/3/12
Time: 9:51 AM
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
views
private java.util.Collection<GameView> views
- Collection of views.
gameStatus
protected GameModel.GameStatus gameStatus
- Actual status of the game.
GameModel
public GameModel()
addView
public final void addView(GameView view)
removeView
public final void removeView(GameView view)
notifyViews
public final void notifyViews()
restart
public abstract void restart()
setGameStatus
public void setGameStatus(GameModel.GameStatus gameStatus)
- TODO: The notification of the views is done here - not decided yet, if it's clever.
- Parameters:
gameStatus
-
getGameResult
public abstract ReversiGameResult getGameResult()
isEndOfGame
public abstract boolean isEndOfGame()
getGameStatus
public GameModel.GameStatus getGameStatus()