From 51b7fbe822bd9a3804c061f0b844884769d7ddba Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Wed, 6 Jul 2011 16:36:06 +0200 Subject: Javadoc git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@609 72836036-5685-4462-b002-a69064685172 --- doc/jrummikub/control/GameControl.html | 474 ++++++++++++++++++++++++++++++++- 1 file changed, 462 insertions(+), 12 deletions(-) (limited to 'doc/jrummikub/control/GameControl.html') diff --git a/doc/jrummikub/control/GameControl.html b/doc/jrummikub/control/GameControl.html index 1359550..1f3bf4b 100644 --- a/doc/jrummikub/control/GameControl.html +++ b/doc/jrummikub/control/GameControl.html @@ -2,12 +2,12 @@ - + GameControl - + @@ -55,7 +55,7 @@ function windowTitle() - PREV CLASS  + PREV CLASS   NEXT CLASS FRAMES   @@ -76,9 +76,9 @@ function windowTitle() - SUMMARY: NESTED | FIELD | CONSTR | METHOD + SUMMARY: NESTED | FIELD | CONSTR | METHOD -DETAIL: FIELD | CONSTR | METHOD +DETAIL: FIELD | CONSTR | METHOD @@ -95,6 +95,9 @@ Class GameControl java.lang.Object extended by jrummikub.control.GameControl +
+
Direct Known Subclasses:
NetworkGameControl
+

public class GameControl
extends java.lang.Object
@@ -108,7 +111,72 @@ Controls a Game, at some point including all Rounds, starts new Rounds

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected  java.util.List<Connection>connections + +
+           
+protected  EventendOfGameEvent + +
+           
+protected  GameSettingsgameSettings +
+           
+protected  GameStategameState + +
+           
+protected  RoundControlroundControl + +
+           
+protected  SaveControlsaveControl + +
+           
+protected  IViewview + +
+           
@@ -118,7 +186,9 @@ Controls a Game, at some point including all Rounds, starts new Rounds Constructor Summary -GameControl(IView view) +GameControl(GameSettings gameSettings, + SaveControl saveControl, + IView view)
          Constructor @@ -136,11 +206,125 @@ Controls a Game, at some point including all Rounds, starts new Rounds  void +abortGame() + +
+          Clean abortion of a running game when another one is loaded or when a new + one is started + + + + void +continueGame(GameState gameState, + IRoundState roundState) + +
+          Continues game after loading + + + +protected  RoundControl +createRoundControl(IRoundState roundState) + +
+          Creates a new round control with the specified round state + + + +protected  IRoundState +createRoundState() + +
+          Creates a new round State + + + +private  void +endGame() + +
+          Ends the running game + + + +private  void +endOfRound(Score roundScore) + +
+          Sets the score and default values for saving when round ends + + + +private  void +endProgram() + +
+          Exits System without warnings if no game control is active + + + + IEvent +getEndOfGameEvent() + +
+          Is emitted when the user ends the game and start a new one + + + +private  void +prepareRound(IRoundState roundState) + +
+          Prepare a new round by setting start player, adding listeners + + + +private  void +removeListeners() + +
+          Removes all listeners from the connection + + + +private  void +restartRound() + +
+          Restarts round after redealing + + + +private  void +showScorePanel() + +
+          Sets score panel visible + + + +protected  void +showWinPanel() + +
+            + + + + void startGame()
          Game gets started by initializing the first Round + + +protected  void +startRound() + +
+          Start a new round within the existing game +   @@ -154,6 +338,85 @@ Controls a Game, at some point including all Rounds, starts new Rounds  

+ + + +

+ + + +
+Field Detail
+ +

+saveControl

+
+protected SaveControl saveControl
+
+
+
+
+
+ +

+gameSettings

+
+protected GameSettings gameSettings
+
+
+
+
+
+ +

+view

+
+protected IView view
+
+
+
+
+
+ +

+roundControl

+
+protected RoundControl roundControl
+
+
+
+
+
+ +

+gameState

+
+protected GameState gameState
+
+
+
+
+
+ +

+connections

+
+protected java.util.List<Connection> connections
+
+
+
+
+
+ +

+endOfGameEvent

+
+protected Event endOfGameEvent
+
+
+
+
+ @@ -164,15 +427,17 @@ Controls a Game, at some point including all Rounds, starts new Rounds -

+

GameControl

-public GameControl(IView view)
+public GameControl(GameSettings gameSettings, + SaveControl saveControl, + IView view)
Constructor

-
Parameters:
view - the view
+
Parameters:
gameSettings - the game settings
saveControl - the save control
view - the view
@@ -185,6 +450,46 @@ public GameControl(

+getEndOfGameEvent

+
+public IEvent getEndOfGameEvent()
+
+
Is emitted when the user ends the game and start a new one +

+

+ +
Returns:
the endOfGameEvent
+
+
+
+ +

+endGame

+
+private void endGame()
+
+
Ends the running game +

+

+
+
+
+
+ +

+removeListeners

+
+private void removeListeners()
+
+
Removes all listeners from the connection +

+

+
+
+
+
+

startGame

@@ -196,6 +501,151 @@ public void startGame()
+
+ +

+continueGame

+
+public void continueGame(GameState gameState,
+                         IRoundState roundState)
+
+
Continues game after loading +

+

+
Parameters:
gameState - the saved GameState (Players, startplayer, points)
roundState - the saved RoundState (activePlayer, Table, heap etc)
+
+
+
+ +

+abortGame

+
+public void abortGame()
+
+
Clean abortion of a running game when another one is loaded or when a new + one is started +

+

+
+
+
+
+ +

+startRound

+
+protected void startRound()
+
+
Start a new round within the existing game +

+

+
+
+
+
+ +

+prepareRound

+
+private void prepareRound(IRoundState roundState)
+
+
Prepare a new round by setting start player, adding listeners +

+

+
Parameters:
roundState - of current round
+
+
+
+ +

+createRoundState

+
+protected IRoundState createRoundState()
+
+
Creates a new round State +

+

+ +
Returns:
the round state
+
+
+
+ +

+createRoundControl

+
+protected RoundControl createRoundControl(IRoundState roundState)
+
+
Creates a new round control with the specified round state +

+

+
Parameters:
roundState - for new round control +
Returns:
the round control
+
+
+
+ +

+restartRound

+
+private void restartRound()
+
+
Restarts round after redealing +

+

+
+
+
+
+ +

+endOfRound

+
+private void endOfRound(Score roundScore)
+
+
Sets the score and default values for saving when round ends +

+

+
Parameters:
roundScore - score for ended round
+
+
+
+ +

+showScorePanel

+
+private void showScorePanel()
+
+
Sets score panel visible +

+

+
+
+
+
+ +

+showWinPanel

+
+protected void showWinPanel()
+
+
+
+
+
+
+ +

+endProgram

+
+private void endProgram()
+
+
Exits System without warnings if no game control is active +

+

+
+
+

@@ -227,7 +677,7 @@ public void startGame() - PREV CLASS  + PREV CLASS   NEXT CLASS FRAMES   @@ -248,9 +698,9 @@ public void startGame() - SUMMARY: NESTED | FIELD | CONSTR | METHOD + SUMMARY: NESTED | FIELD | CONSTR | METHOD -DETAIL: FIELD | CONSTR | METHOD +DETAIL: FIELD | CONSTR | METHOD -- cgit v1.2.3