CSCE 590: Problem Set 3

Due: Wednesday, 10 April 2002, 4:00pm

Upload Problem Set

Network Tic-Tac-Toe

For this problem set you will implement a Tic-Tac-Toe game server which allows any number of people to start or join Tic-Tac-Toe games.

Basic Use Case

  1. User gets a menu with three options: start a new game, get a list of open games, or join an existing game. User chooses to start a new game.
  2. Another user gets the same menu and chooses to see a list of the open games. He sees the open game started by the first user and chooses to join it.
  3. The two users take turns making moves.
  4. If a user makes an illegal move, or tries to make a move when its not his turn he is informed that this is illegal.
  5. When one of the players wins they are both informed of that fact, an appropiate message is displayed, and the game ends.

Basic Design

You will need to implement an object to handle all the games, as well as an object for each game. The "games object" interface will have methods that allow the client to list the set of currently open games, as well as to create a new open game. The "game object" will handle an actual game. Its interface will allow the client to find out the current state of the game (i.e., where are the pieces and whose turn is it, including a finished game), to make a legal move (signaling the client if he makes a bad or out-of-turn move), and to quit the game at any time.

You do not need to implement a GUI, a simple command line interface is enough. Of course, if you want to implement a GUI you are allowed to do so.

Your program must use several of the basic data types in IDL, including an array (probably usefull for returning the state of the board.)

Java Implemenation (70%)

You will implement a server an client in Java. It should be able to handle any number of open or ongoing games.

C++ Implementation (30%)

You will implement a client in C++ using MICO which is installed in the Unix machines on the lab. This client will communicate with your Java server. You should be able to play a game between one client using the C++ program and one client using the Java program.

Handing it in:

As will all the problem sets, you will hand them in using our department's dropbox, at this link. You will hand in all your javadoc-commented java files. You will be graded on your (lack of) documentation. You will also include a README file that gives step-by-step instructions on how to run your program. This file should also include an English description of the architecture of your program: the most important classes, how they work, how they interact with each other, and why you made the design decisions that you did. This description should be roughly at least three parragraphs long. Remember that the harder you make it for us to run your program, the more annoyed we will be when grading it. You must use the sample README.txt as your template. Failure to follow any of these rules will result in a 50% penalty.

Questions

Q:Does the server return the board to both the players when either of them makes a move so that the other player also knows ?
A: It is not necessary for the server to do a callback to one of the clients when the other one makes a move. You can assume that the players keep checking the board state. However, the server must not allow a player to make a move when it is not his turn.

Q:What do you exactly mean by the current state of the game?
A:The state of the board and whose turn is it or, if the game is over, who won.

Q:Regarding mico, there are certain fields we could not define in the Makefile like the flags etc. Can we get a sample Makefile because we do not know what parameters are defined on our SUNS.
A:You can download your own mico distribution from the mico website.


A funny comic strip.

José M. Vidal
Last modified: Sun Mar 31 08:47:55 EST 2002