25-09-2013, 04:06 PM
Ultimate Chess
Ultimate Chess.pdf (Size: 129.53 KB / Downloads: 102)
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.
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.
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.