Online Game Chess

Software Requirements Specification

Version 1.0

Student Id:

BC100400197

Group Id:

F130284421

Supervisor Name:

Sir Tanweer Arshad

Revision History

Date (dd/mm/yyyy) / Version / Description / Author
21/11/2013 / 1.0 / SRS for Online Game Chess. Chessis a two-playergame which is played on a chessboard. Chess comprises on 64squares arranged by eight rows and eight columns. It is very popular games played internationally by millions of people / BC100400197

Table of Contents

  1. Scope (of the project)
  2. Functional Requirements Non Functional requirements
  3. Use Case Diagram
  4. Usage Scenarios
  5. Adopted Methodology
  6. WorkPlan (Use MS Project to create Schedule/Work Plan)

SRS Document

Scope of Project:

Chessis a two-playergame which is played on achessboard. Chess comprises on 64squares arranged by eight rows and eight columns. It is very popular games played internationally by millions of people. This document explains all features, functions, and constraints of this program. This Chess game is built to allow remote users to play each other in chess. Its main focus is just to let people play; as users log into the system they are paired with the first available player and can proceed. The program needs to be intuitive, reliable, and easy to use. The scope of this project is to provide chess game that is intuitive and entertaining for players of all skill levels. The game also provides some useful features, such as the ability to save a game and return to it later. In general, it focuses on providing a simple, streamlined playing experience.

Functional and non Functional Requirements:

Functional requirement define the software functionality of product from the system’s perspective that the developer must build to enable the users to accomplish their task stated in the user requirement. Non-functional requirement describe services provide by system along with constraints under which the system operate.

Functional Requirements:-

For defining the requirement in terms of system’s perspective I divide the players into three categories, which are given below:

  • Guest
  • Registered user
  • Administrator

I describe functional requirement of all user as given below:

Guest:

  • System facilitates the user the Guest player to create new account.

Registered User:

  • System facilitates the registered user to sign in.
  • Registers user select competitor from the available list of competitor and send him/her request to play.
  • Register user should play the game in the fix time control (maximum 30 minute for each game).
  • User start game, make moves, capture pieces, save games rules for them are given as

Movement:-

Bishop: Bishops shall move diagonally any number of spaces unless impeded by another piece.

Rook: Rooks shall move vertically or horizontally any number of spaces unless impeded by another piece.

Queen:Queens shall move vertically, horizontally, or diagonally any number of spaces unless impeded by another piece.

When making these moves the bishop, rook or queen may not move over any intervening pieces.

Pawn: Pawns shall move one space forward, optionally two spaces forward on their opening move. The pawn may move forward to the unoccupied square immediately in front of it on the same file, oralternatively it may advance two squares along the same file provided both squares are unoccupied, orthe pawn may move to a square occupied by an opponent’s piece, which is diagonally in front of it on an adjacent file, capturing that piece. A pawn attacking a square crossed by an opponent’s pawn which has advanced two squares in one move from its original square may capture this opponent’s pawn as though the latter had been moved only one square. This capture is only legal on the move following this advance and is called an ‘en passant’ capture. When a pawn reaches the rank furthest from its starting position it must be exchanged as part of the same move on the same square for a new queen, rook, bishop or knight of the same color. The player’s choice is not restricted to pieces that have been captured previously. This exchange of a pawn for another piece is called ‘promotion’ and the effect of the new piece is immediate.

Knight: Knights shall move two spaces either vertically or horizontally followed by one space perpendicularly.

King: Kings shall move one space in any direction. The king can move to any adjoining square not attacked by one or more of the opponent’s pieces.

Castling: When requirements are met for castling, kings may move two spaces towards a rook, with the rook moving onto the space crossed over by the king.

Capturing:-

General Capture: If a piece other than a pawn, moving in its normal fashion, may move into a square occupied by an opposing piece, the friendly piece may capture the opposing piece.

Pawn: Pawns shall capture by moving forward one space diagonally into an opposing piece.

En Passant: When requirements are met for en passant capture, a pawn may capture as above into a space crossed, but no longer occupied by an opposing piece.

Promotion:-

Promotion: A pawn, having entered the rank opposite where it started, shall be promoted to a piece of its controller's choosing.

Move Legality

Legality: A move shall be deemed illegal if it does not follow the above rules or would cause the moving player's king to become in check.

Game Saving/Loading

  • A user shall be able to save his/her game.
  • He shall be able to load his game from a save file, even if he/she is on a different computer than the one where the game was originally saved.
  • A save game shall contain the following information:
  • The positions of each user's pieces.
  • Whose turn it is.
  • The most recent move made.

Administrator

  • System allows the administrator to sign in.
  • System allows the administrator to allow/reject new player request.
  • System allows the administrator to manage records of each individual player.
  • System provides access to administrator to delete account of the registered user.
  • System facilitates the administrator to sign out.

Non Functional Requirements:

  • Base and pieces must not be overly large.
  • User interface must be comparable to computer/game console chess games
  • Pieces controlled and piece movement system must move seemingly magically.
  • The game will have no more than a 3 second lag between user input and response.
  • The various validations to test whether a move is valid have to be performed within a time constraint to allow acceptable game play.

Use Case Diagram(s):

Usage Scenarios:

Guest:

Use Case Title / Create Account
Use Case Id / UC01
Actor / Guest
Desecration :
The Guest wants to create an account in Online Chess Game to become a Registered User.
Pre Conditions:
The Guest has properly turned on the system and connected to Chess Game.
Task Sequence / Exceptions
  1. The use case starts when the user opens the Chess game and wants to create an account in Chess game.
  2. User press the create account tab in page.
  3. System response giving empty spaces for information.
  4. The user fills needed information.
  5. After filling all needed information the user press button submit.
  6. System response message is your account has been made. If user feed incorrect / missing information system identifies and account page reopen and the process repeated until account made successfully.
  7. The use case end.
Alternate Scenarios:
3-a: The user closes the logon page. / None.
Post Conditions:
New account has been created in the Chess game and does all the authorized operations to which he / she HAVE rights.
Modification history: November 27,2013

Registered User:

Use Case Title / Sign in
Use Case Id / UC02
Actor / Registered User,Administrator
Desecration :
The Registered user wants to log on to the Chess game
Pre Conditions:
The user has properly turned on the system and connected to the Chess game.
Task Sequence / Exceptions
  1. The use case starts when the user comes and wants to log in to Chess game
  2. The system asks the registered user to enter his /her ID and Password to log in.
  3. The user enter his/ her ID and password and click appropriate button
  4. The system verifies the User ID and password and logs the user to his /her personal account. Exception 1
  5. The use case end.
Alternate Scenarios:
3-a: The user closes the logon page.
1- Go to step 2 /
  1. The user enters wrong ID or Password. Then the system will generate an error message and asks again for User ID and password.

Post Conditions:
The Registered user has logged on to the Chess game and does all the authorized operations to which he / she HAVE rights.
Modification history: November 27,2013
Use Case Title / New game
Use Case Id / UC03
Actor / Registered User
Desecration :
The Registered User wants to play a new game of Chess on the website.
Pre Conditions:
The User has properly turned on the system and log in to the Chess Game website.
Task Sequence / Exceptions
  1. The use case starts when the user log in to Chess game and wants to play a new game of Chess
  2. The User click on New Game tab.
  3. The system responds by asking about wants to play new game.
  4. The User confirms and system start new game.
  5. The use case end.
Alternate Scenarios:
3-a: The user closes the logon page. / none
Post Conditions:
The user selected a new game and does all the authorized operations to which he / she HAVE rights.
Modification history: November 27, 2013
Use Case Title / Choose Player
Use Case Id / UC04
Actor / Registered User
Desecration :
The Registered User wants to choose player for the Chess game.
Pre Conditions:
The user has properly turned on the system and log in to the Chess Game website.
Task Sequence / Exceptions
  1. The use case started when user want to choose player for chess game.
  2. Player click on the choose player tag.
  3. The system respond by giving list of competitor based on rating from which user select person which he /she want to play.
  4. User selects the player and click ok.
  5. This use case ends
Alternate Scenarios:
3-a: The user closes the logon page. / None
Post Conditions:
The competitor has been selected by the player.
Modification history: November 27, 2013
Use Case Title / Send Request
Use Case Id / UC05
Actor / Registered User
Desecration :
The Registered User wants to send request to competitor.
Pre Conditions:
The User has properly turned on the system and log on into chess game.
Task Sequence / Exceptions
  1. The use case started when user want to send request to the selected competitor.
  2. User clicks on the send request tag.
  3. The system responds that the request has been accepted by the competitor.
  4. The use case end.
/ None
Post Conditions:
The user has successfully sent request to competitor.
Modification history: November 27,2013
Use Case Title / Play game
Use Case Id / UC06
Actor / Registered User
Desecration :
The Registered User wants to play Chess game.
Pre Conditions:
The user has properly turned on the system and log in to the Chess Game website.
Task Sequence / Exceptions
  1. The use case starts when the user wants to play Chess game.
  2. The user click on the Play button to start the game.
  3. The system draw chess board so that each player has his/ her pieces at the bottom of her display.
  4. This use case ends.
Alternate Scenarios:
3-a: The user closes the logon page. / None
Post Conditions:
The game has been started and board has been made.
Modification history: November 27,2013
Use Case Title / Select color
Use Case Id / UC07
Actor / Registered User
Desecration :
The Registered User wants to select color of piece in Chess game
Pre Conditions:
The user has properly turned on the system and log in to Chess game.
Task Sequence / Exceptions
  1. The use case starts when the user wants to select color of piece.
  2. The user select black or white colour of piece from the options.
  3. This use case ends.
Alternate Scenarios:
3-a: The user closes the logon page. / None
Post Conditions:
The color of piece has been selected.
Modification history: November 27,2013
Use Case Title / Select piece
Use Case Id / UC08
Actor / Registered User
Desecration :
The Registered User wants to select a piece in Chess game
Pre Conditions:
The user has properly turned on the system and log in to Chess game.
Task Sequence / Exceptions
  1. The use case starts when the user wants to select a piece.
  2. The player clicks a piece to select it.
  3. This use case ends.
Alternate Scenarios:
3-a: The user closes the logon page. / None
Post Conditions:
The piece has been selected.
Modification history: November 27,2013
Use Case Title / Make move
Use Case Id / UC09
Actor / Registered User
Desecration :
The Registered User wants to make move of the selected piece in the Chess game.
Pre Conditions:
The user has properly turned on the system and log in to Chess game.
Task Sequence / Exceptions
  1. The use case starts when the user wants to move the selected piece.
  2. The user clicks a piece to move it. The game displays the positions it can move to.
  3. The player selects the new destination by clicking. The piece is moved.
  4. This use case ends.
Alternate Scenarios:
3-a: The user closes the logon page. / The piece is no longer being there in the place from where the piece is moved.
Post Conditions:
The piece has been moved and no longer be their in that place from where it is moved.
Modification history: November 27,2013
Use Case Title / Checkmate
Use Case Id / UC10
Actor / Registered User
Desecration :
The Check for checkmate in the Chess game.
Pre Conditions:
The user has properly turned on the system and log in to Chess game.
Task Sequence / Exceptions
  1. The use case starts when the user wants to check for checkmate.
  2. The system runs tocheck to determine if the player king is under check from any enemy pieces. If so, the system shall examine whether there is a check-mate and if not the system shall proceed to displaying the results of the examination.
  3. The system runsto check if the local player king can move to any square that is not under check. The system shall then display the results of the examination.
  4. The system shall display a dialog box that the player has lost the game.
  5. The system shall transmit a message to the opponent, stating the outcome of the game.
  6. The system shall allow the player to create a new game per the Start Game use case.
  7. This use case ends.
Alternate Scenarios:
3-a: The user closes the logon page. / None
Post Conditions:
The piece has been check for checkmate.
Modification history: November 27,2013
Use Case Title / Next turn
Use Case Id / UC11
Actor / Registered User
Desecration :
The Registered User wants to make next turn in the Chess game.
Pre Conditions:
The user has properly turned on the system and log in to Chess game.
Task Sequence / Exceptions
  1. The use case starts when the user wants to make next turn.
  2. If there is no checkmate the system allows the player can make a next move.
  3. This use case ends.
Alternate Scenarios:
3-a: The user closes the logon page. / None
Post Conditions:
The player made a next turn.
Modification history: November 27,2013
Use Case Title / End Game
Use Case Id / UC12
Actor / Registered User
Desecration :
The Chess game ends.
Pre Conditions:
The user has properly turned on the system and log in to Chess game.
Task Sequence / Exceptions
  1. The use case starts when the game ends.
  2. The system checks if the player king is under check from any enemy pieces. If so, the system shall examine whether there is a check-mate and if so the system ends game and display the result.
  3. This use case ends.
Alternate Scenarios:
3-a: The user closes the logon page. / None
Post Conditions:
The game ends.
Modification history: November 27,2013
Use Case Title / Save Game
Use Case Id / UC13
Actor / Registered User
Desecration :
The Registered User wants to save the Chess running game.
Pre Conditions:
The user has properly turned on the system and log in to Chess game.
Task Sequence / Exceptions
  1. The use case starts when the user wants to save the running game.
  2. The user clicks a save game option.
  3. The system responds by asking about wants to save this game.
  4. The Player confirms and system saves game.
  5. The use case ends
Alternate Scenarios:
3-a: The user closes the logon page. / None
Post Conditions:
The game is saved
Modification history: November 27,2013
Use Case Title / Chat with player
Use Case Id / UC14
Actor / Registered User
Desecration :
The Registered User wants to chat with the competitor in the Chess game.
Pre Conditions:
The user has properly turned on the system and log in to Chess game.
Task Sequence / Exceptions
  1. The use case starts when the user wants chat with the competitor in the chess game.
  2. The user clicks on the chat button.
  3. The system responds by displaying chat dialog box.
  4. The user write chat in the dialog box and press send button to send it to competitor.
  5. The use case ends.
Alternate Scenarios:
3-a: The user closes the logon page. / None
Post Conditions:
The user will chat with his/her competitor.
Modification history: November 27,2013
Use Case Title / Exit Game
Use Case Id / UC15
Actor / Registered User
Desecration :
The Registered User wants to exit the Chess game.
Pre Conditions:
The user has properly turned on the system and log in to Chess game.
Task Sequence / Exceptions
  1. The use case starts when the user wants to exit the chess game.
  2. The user clicks on the exit game button.
  3. The system responds by asking about wants to exit from the game page.
  4. The user confirms and system exit game.
  5. The use case ends.
Alternate Scenarios:
3-a: The user closes the logon page. / None
Post Conditions:
The game exit.
Modification history: November 27,2013
Use Case Title / Sign out
Use Case Id / UC16
Actor / Registered User ,Administrator
Desecration :
The Registered User wants to log out of the Chess game
Pre Conditions:
The user has properly turned on the system and connected to the Chess game.
Task Sequence / Exceptions
  1. The use case started when user want to log out from Chess game.
  2. User clicks on the log out tab.
  3. System log out the user from Chess game.
  4. The use case end.
Alternate Scenarios:
3-a: The user closes the logon page.
1- Go to step 2 / None
Post Conditions:
The Registered user has logged out of the Chess game and does all the authorized operations to which he / she HAVE rights.
Modification history: November 27,2013

Administrator Use cases: