Sei sulla pagina 1di 9

Software Requirement Specification

Project Title: Ultimate Chess


Team Members: Chris Curry, Jim Gregory, Justin Lampley, Bidit Mazumder

Introduction

Goals:

The aim of this project is to develop a two-player chess game that implements all
of the standard rules of chess, a graphical user interface, and a networking
module capable of TCP/IP communication.

Functional Description:

Users will have the ability to play chess on a standard chess board implemented
with a top-down isometric view. The program will have the ability to discriminate
legal moves from illegal moves based on moves that the user tries. This is done
by selecting a piece on the board and using the mouse to click and drag the
piece over the intended square. The user's board will also be updated with
moves sent from an opponent across the network.

Data Description (Appendix A2)

The game will be implemented entirely with the Java programming language.
This will provide a complete, cross-platform library for all GUI and networking
needs, assuming a Java Virtual Machine is running on any machine using the
program.

Game Control Module:

The Game Control module will handle all communication between the three basic
modules for the game's implementation: The GUI module, the networking
module, and the chess game module. This will be accomplished with interfaces
to give access to functions as needed by each module.

Graphical User Interface:

The GUI Object will be responsible for drawing the chess board, pieces, and a
user menus. This object handles user input and a “chat” window for
communication between players. This module will also be communicating with
the game control object to access the networking module for any output or input
needed.

Networking:

The networking module will contain methods handle communications between


two instances of the game. It will have the ability to send and receive data by
TCP/IP protocols. It will be multi-threaded to listen for incoming moves or chat
messages.
Functional Model:

New Game:

Initialize new chessboard with all pieces in proper starting position. ChessBoard
constructor is called, and all piece objects are created with initial values.

Host (Appendix A1.1):

Brings up a networking window with text boxes so the user can enter networking
parameters (port number, alias).

Client (Appendix A1.2):

Opens new window with IP parameters (Server IP address, Host port, Server
alias) and Connect to Host button.

Connect to Host:

Calls network module to connect to host to initiate new game.

Chat Text Box:

User will enter text here and click Send Chat Message to send a message
through the network module.

Send Chat Message:

Sends a string entered in the Chat Text Box across the network.

Select Move:

Uses the GameRules modules to test the validity of the users selected move. If
the move is not valid, a Boolean will be returned to the GUI module, and the user
is notified that the move was not valid. If the move is valid, the GameBoard is
updated, and the move is sent across the network to the opponent.

Hint:

Provides an intelligent move for the user who is stoned or baffled (i.e. selects a
random legal move on the board).
Interface Description:

GUI_UpdateInterface:

This interface contains method(s) for updating the GUI. This interface is
necessary because some modules need direct access to the GUI refresh method
without violating class encapsulation.

NetworkingInterface:

This interface communicates primarily with the game control module to provide
networking functions as needed.

GameObjectInterface:

This interface will contain get methods that return data structures that hold the
data necessary for holding this objects move information (for example, an array
might hold a Queens current legal moves).

Software Behavior (Appendix A3):

The user will start the program and is immediately presented with an option to
select whether he is to be a host or a client. Once a connection is established, a
new game is initialized. The user is presented with a graphical representation of
a chess board with all pieces in their respective starting places. Once it becomes
the user's turn to move, the user may select a piece to move by clicked on the
desired piece and dragging it to an available square. The user may assume that
his moves are checked for legality. If a given move is shown to be illegal by the
system, the user is informed and is prompted to select a different move. If the
move is legal, the game board is updated and the networking module is invoked
to send the indicated move across the network. Also, during game play both
users will have the ability to send messages to one another by typing messages
in a text box on the screen.
The game will continue until either user ends his turn with a checkmate or a
draw. In either case, both user are informed and the game is over. At this point,
the users may choose to begin a new game or quit.
Appendix

A.1 Use Cases

A1.1 Host Use Case

• user is doing a handstand while playing chess


A1.2 Client Use Case

• this picture of the user was inspired by Picasso


A.2 UML State Diagrams

A.2.1 Game Control


A.2.2 Game Engine Classes

A.2.3 Chess Piece


A.3 State Diagrams

A.3.1 Client Connection


A.3.2 Client Server

Potrebbero piacerti anche