CS 441 - Distributed Object Programming

Fall 2007

Homework 3

Distributed Roulette Game

Due: Sunday, November 4, 2007 at 11:59 pm

For this project, you are to create a distributed roulette game using Java RMI. We will use the wikipedia's page as our official rules on the game of American Roulette (including both the 0 and the 00 space).

Added 10/18/2007

The the assignment, you are only required to support the following types of bets as they are defined on the wikipedia page.

Original Write-up

The server is to "let the ball drop" at regular intervals which is to be specified as a the command line argument in seconds when the server starts. If no command line argument is given, set the interval at 1 minute.

The server is to give two noticifications to the clients at 30 seconds and 15 seconds before the ball drops (assuming the duration between drops is grater than 30 seconds). Bets arriving after the current ball has been dropped will be used for the next game.

After each game is completed, each client should be notified of the winning number, number and type of winning bets places by that client, total number of winning bets by all clients, the total amount of the winnings by that client, and the total amount of winnings by all clients.

The server should have a way to stop the server. Once the command is executed and the current interval/game is finished, a message is sent out to all clients stating that there will be one more interval/game before the server shuts down.

The server should also display the number of bets and amount of the bets for the current game. The server is also to show the to total number of bets made by all previous games, the total number of winning bets in all previous games and the balance of points collected/paid out by the server in all previous games.

When a client starts, it is to be given 500 points to make bets. The amount of points should be deducted as bets are made and increased as bets are won. Whether the number of points a client has can be negative is left up to the programming team.

A client must be allowed to make multiple bets during each game. A client must be allowed to easily repeat the bets mades during the previous game. A client must be able to let the winnings from the previous game be re-bet in the same type of bet (this is called "letting it ride").

The programming team is encouraged to use a GUI for both the server and clients. Doing so can earn a total of 20 points extra credit for teh assignment (5 points for the server, 15 points for the clients).

The exact nature of the RMI calls used is left up to the programming team.

Your project is to be turned in electronically via turnin to the CS 441 instructor account using the project name of "hw3". Students may work alone or with another student on this project. You are also to write up a README file that discusses how to compile and run the project, and the communication protocol used between the server and the clients. Also, there will be some points for the project awarded based on programming style used in your project.

How to turn in your work

Turnin your program electronically using the "turnin" command from your CS account as follows:

turnin -c cs441 -p hw3  [your project directory]
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. This also assumes that you are in the parent directory of the project directory when executing the command.

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.

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:

    turnin -c cs441 -p hw3 -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.