robinmaypanpan / gamegalaxy

Automatically exported from code.google.com/p/gamegalaxy
0 stars 0 forks source link

GAME STATE: the UI should only be able to end a turn via ArimaaEngine.endTurn(), not GameState.endTurn() #120

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When ending a turn through the default ArimaaUI, the "End Turn" button
invokes endTurn() through the ArimaaEngine, which then calls
GameState.endTurn().  This flow is necessary since the Engine is
responsible for maintaining a previous GameState (for Undo purposes) and
sending the updated GameState to the UI.

Since the GameState is sent to the UI, we want to generalize this so that
the UI cannot directly access the GameState.endTurn() method.

Original issue reported on code.google.com by andrea.l...@gmail.com on 22 Dec 2009 at 5:29

GoogleCodeExporter commented 8 years ago

Original comment by JoyceM137@gmail.com on 6 Jan 2010 at 5:40

GoogleCodeExporter commented 8 years ago
Splitting GameState into ModifiableGameState, and giving the UI access only to
GameState, will prevent the UI from having access to methods which it should 
not have.

Original comment by andrea.l...@gmail.com on 6 Jan 2010 at 7:30

GoogleCodeExporter commented 8 years ago

Original comment by andrea.l...@gmail.com on 6 Jan 2010 at 7:31