CHINESE CHECKERS
Classes
1) GameController
2) Game
3) MainBoard
4) GameBoard
5) Registrar
6) DataBaseInterface
7) LoginScreen
8) Registration
9) LoginHandler
10) ButtonPanel
11) ButtonEvent
12) UpdateOption
13) PlayerDetail
14) GameDetail
15) PauseGameHandler
16) ResumeGameHandler
17) GameApplet
18) GamePostion
19) Peg
20) GameManager
21) ActivePlayerList
22) PegMoveEvent
23) PegMoveEventListener
CRC CARDS
Class: GameController |
Responsibilities: |
Collaborators: |
Creates new object of Game class for each create game request. |
|
Process the invite request |
PlayerDetail |
Process the join request |
PlayerDetail, GameDetail, Game |
Process the watch request from user to watch any game. |
PlayerDetail, GameDetail, Game |
Process the request for player's win and loss record. |
PlayerDetail, DataBaseInterface |
Forwards the registration and login info of the user to registrar class. |
Registrar |
Forwards the save game and resume game requests. |
PauseGameHandler, ResumeGameHandler |
Process the request to change the user password |
Registrar |
|
|
Class: Game |
Responsibilities: |
Collaborators: |
Process and accept the join request. |
|
Send the information to Database about the win and loss record of players. |
DatabaseInterface |
Updates/Synchronises the GameBoard objects of the players involved in that game. |
MainBoard |
Maintains the list of all the players in the game. |
|
|
|
Class: MainBoard |
Responsibilities: |
Collaborators: |
Displays the information of the current games being played. |
Table |
Forwards join, create, invite, watch, update requests to GameController class. |
GameController, ButtonPanel |
Process the request for creating new GameBoard object , from Game class. |
GameBoard, Game |
Forwards all the updates send by the Game object to GameBoard object and vice - versa. |
GameBoard, Game |
|
|
Class: GameBoard |
Responsibilities: |
Collaborators: |
It creates the play board. |
GameApplet |
It informs any play action to the game class through mainboard class. |
MainBoard |
It informs the game class about the game completion and win & loose details. |
MainBoard |
It informs the game class, when some player quits or exit the game. |
MainBoard |
It forwards the pause request to save the game. |
MainBoard |
It disables the play functionality of the game for watch request. |
|
It keeps track of the time for each turn of the player. |
|
|
|
Class: Registrar |
Responsibilities: |
Collaborators: |
It process the authentication of login information. |
DatabaseInterface, GameController |
It process the registration of user. |
DatabaseInterface, GameController |
It forwards the update request by the user to change the user password. |
UpdateOption |
|
|
Class: DatabaseInterface |
Responsibilities: |
Collaborators: |
It registers the user. |
|
It checks the authenticity of login information provided by user. |
|
It updates the database when the user wants to change the loginID or password. |
|
It adds win or loss information to the database. |
|
|
|
Class: LoginScreen |
Responsibilities: |
Collaborators: |
Displays the login screen & accepts userid/password. |
LoginHandler |
Invokes the Registration Screen. |
Registration |
|
|
Class: Registration |
Responsibilities: |
Collaborators: |
It displays the form which user has to fill out for registration. |
LoginHandler |
|
|
Class: Table |
Responsibilities: |
Collaborators: |
It forwards the join and watch request of the user. |
ButtonEvent |
It displays the detail of all the games in the form of table. |
MainBoard |
|
|
Class: LoginHandler |
Responsibilities: |
Collaborators: |
It takes the login or registration details and forwards it for process. |
GameController |
It displays MainBoard when the confirmation is received. |
MainBoard |
|
|
Class: ButtonPanel |
Responsibilities: |
Collaborators: |
It handles the following buttons:- Create, Resume, Invite, Update, Logoff |
ButtonEvent |
|
|
Class: ButtonEvent |
Responsibilities: |
Collaborators: |
It processes the events associated with the ButtonPanel, GameBoard & Table classes |
|
|
|
Class: UpdateOption |
Responsibilities: |
Collaborators: |
It process update request for changing the userId and password. |
DatabaseInterface |
|
|
Class: GameApplet |
Responsibilities: |
Collaborators: |
It displays the game board. |
|
|
|
Class: GamePostion |
Responsibilities: |
Collaborators: |
Positions pegs on the board.. |
Peg |
Positions players on the board.. |
Player |
|
|
Class: Peg |
Responsibilities: |
Collaborators: |
Defines size of peg. |
|
Defines colour of peg. |
|
Defines location of peg. |
GamePosition, Player, GameBoard |
|
|
Class: GameManager |
Responsibilities: |
Collaborators: |
Broadcasts user information. |
ActivePlayerList, GameBoard |
Knows the number of games being played. |
Game |
Removes player from game. |
ActivePlayerList |
Updates ActivePlayerList. |
ActivePlayerList |
|
|
Class: ActivePlayerList |
Responsibilities: |
Collaborators: |
Maintains the List of Players playing that Game. |
|
|
|
Class: PegMoveEvent |
Responsibilities: |
Collaborators: |
Responds to pegs being moved.. |
Peg, Player |
|
|
Class: PegMoveEventListener |
Responsibilities: |
Collaborators: |
Mirrors moves. |
PegMoveEvent |
Enable Opponents. |
Player |
Determine match complete. |
|
|