Due Date: Tuesday, October 6, 2005, at 11:59 pm
For this assignment, you are to create a Match Maker server which will
interface to clients and act as a middleman for pairs of clients to play
a two player game. The game can be anything you wish (using Tic-Tac-Toe
from the first assignment is somewhat expected).
Each client will have a list of all of the known clients connected to the
server. As a new client connects to or disconnects from the server, the
list on each client is to be updated to reflect this change in the number
of clients. Each client must come up with a name that will be used to
identify that client. This name does not need to be unique, so your server
should use some internal identification method to keep each client
unique.
To play the game against another client, one client will issue a "challenge"
to another client.
During the game play, all communication between the two players
is to go through the server. The server need not have any specified
user interface, but you are more than welcome to create one.
We will assume that the server is set up on some known port, which may
be hardcoded into both the server and the clients. You may (but are not
required to) allow a port value to be given via an optional command
line argument.
The client program is to take an optional command
line argument of a machine name that specifies the machine the server is
running on. This optional command line argument is to be specified by
the flag of -m. If no machine name is give assume the server is running
on the same machine as the client.
Your client program should "gracefully" exit after if the other end of the
socket exits (i.e. the server goes down).
You may work on this project individually or in a group of two people.
If you are working in a group, only submit one copy of the project but
make sure you clearly identify all members of the group. A
group size of three people may be allowed only if Prof. Troy agrees
(proceeded by a large amount of pleading by all members of the group
in which justification is given as to why you should be allowed to
have three members in the group).
Your program is to be submitted electronically via the turnin
command on the LINUX machines. The project name for this is mp2.
All programs are expected to be written in good programming style
using the java programming language.
How to turn in your work Turnin your program electronically using the "turnin" command from
your CS account as follows: Notice you can only invoke turnin command on the Linux
machines in the lab or after logging into the server machine oscar.cs.uic.edu. turnin -c cs441 -p mp2 -v Note that you can execute turnin as many times as you would like, up until
the program deadline when turnin will be disabled for this project. Each time
you execute turnin for a project, you overwrite all of what you had turned in
previously for that project.It does not work in an incremental way.
where the [your project directory] is the directory name under which you have
all your files related to this programming problem. The turnin command will
automatically compress the data under your directory, so there is no need to do
the compression by yourself.
turnin -c cs441 -p mp2 [your project directory]
If you want to verify that your project was turned in, look in the turnin
directory for a file with your userid. For instance for this project, from your
CS account you would type: