Operations: pauseGame()
**Cross-References: Use-Cases:**Pause/Resume Game
Pre-Conditions:
- Game must be already set up.
- The previous playing game has been saved.
Post-Conditions:
- No instance was created.
- No association were formed
- continueSaved() method has been called.
Operations: resumeGame()
**Cross-References: Use-Cases:**Pause/Resume Game
Pre-Conditions:
-Game must be already set up.
Post-Conditions:
- A game instance has been created.
- Previous saved game was loaded.
Operations: setPlayerCount()
Cross-References: Use-Cases:(Set Game) Game Setup
Pre-Conditions:
- Game should have just started.
- playerList has been completed.
- Players has been added to list
Post-Conditions:
- Number of players should be fixed
- setPlayerCount(PlayerList playerList)
- A PlayerList instance was created as playerList (Instance creation)
- Number of players has been counted by an enhanced for loop. If the number of players was not valid, the playerNumberError instance was created as countError. (Instance creation)
- Count error was given to reportError(Error e) method.
Operations: createGame()
Cross-References: Use-Cases:(Set Game) Game Setup
Pre-Conditions:
- Game should not have started.
Post-Conditions:
- Screen displays game.
- createGame()
- A Game instance was created (Instance creation.)
- addPlayer() method was called.
- A playerList was taken from addPlayer() method.
- game.playerList became playerList from addPlayer(). (Attribute modification)
- game.history became current history. ( Attribute modification )
Operations: saveGameSeesion(Game game**)
Cross-References: Use-Cases:**Pause/Resume Game, (Set Game)Game Setup
Pre-Conditions:
Post-Conditions:
- Current game progress is stored.
- A Game instance was created as game. (Instance creation)
- game was associated with current game instance(Association formed)
- game.History is assigned to history(Attribute modification)
Operations: reportError(Error e)
**Cross-References: Use-Cases:**All use cases
Pre-Conditions:
- Player tries invalid action.
- The corresponding error instance has been created and provided.
Post-Conditions:
- System displays an error message accordingly.
- An Error instance was created as an error. (instance creation) - No attribute modification.
- No association formed. - @toString() method of error was returned to the user.
Operations: showHelp( (optional) str helpCode)
**Cross-References: Use-Cases:**All use cases
Pre-Conditions:
- Player tries invalid action.
- The corresponding error instance has been created and provided.
Post-Conditions:
- System displays help options.
- General information expression/attribute was created as genInfo.
- General information was assigned to genInfo. - genInfo printed/displayed.
- A specific request exp./attribute is created as specReq.
- A click or command was taken from the user and assigned to specReq. ( This could be quit from help such as “q”)
- The specific request was displayed to the user.
- Process continue until the user quit from help.
- (optional) Additional or more specific requests accepted.
Operations: addPlayer(str name)
Cross-References: Use-Cases: (Set Game) Game Setup
Pre-Conditions:
- Game should have just started.
- Name of the player has been decided and provided.
Post-Conditions:
- A list of players was called a playerList.
- Player instance was created.(Instance Creation)
- Name is assşgned to Player instance. (Attribute modification)
- Player instance has been added to the playerList.
- A boolean or a message returned.(F.e: “Player has been added”)