Engr. 9874 Assignment 1

Due: 0900 Wednesday, Jan. 30, 2008.

This assignment is to be done individually. Each student must submit their own solution which should be independent work.

This assignment has two parts, as follows, both of which are with respect to the game of "Dots", which is described below.

  1. Using the html template develop a set of use cases to describe the following modes of play for the game:
    1. Two player game, both players sharing the same mouse and keyboard.
    2. One player game, playing against the computer.
    3. Two player networked game, each player using a different computer. The software communicates so that each player sees the other's actions.
    At least three use cases are required (one for each of the above modes), and you may find it helpful to define other use cases for the common parts of the game and include these in the others. Please note that the description below does not contain all of the details of these behaviours, but you are expected to make them up. We will not be evaluating your solution based on the specific details that you propose, but rather will be evaluating the style and thoroughness of your use cases.
  2. This (dots_source.zip) zip file contains the source code for a first increment (supporting only the first use case above) of part of the game. You are to implement a class model.yourLogin.DotsModel (where yourLogin is your engineering login name) that implements the model.DotsModelInterface interface. The required behaviour of each of the methods is described in the javadoc comments in DotsModelInterface.java. Hint: You can automatically generate the class stub using most java development environments. In Eclipse, select the model package and activate File->New->Class, then add DotsModelInterface to the interfaces box. All you need to do then is fill in the method implementations.

Game Description

This is a two-player game played on a rectangular grid of dots. The size of the grid is chosen by the player who initiates the game. Players take turns selecting a pair of horizontally or vertically adjacent dots to be connected with a line segment, as illustrated below. The object of the game is to be the player who connects the dots to form the fourth segment to close a square, which results in a point for that player, the enclosed square is coloured that player's colour and s/he is awarded another turn.

Image of dots game.

The game ends when there are no pairs of unconnected dots available on the board. The winner is the player with the most points.

You can play the game by downloading and running dots.jar.

Submit your solution in a single zip file (note: note it must be zip, not a rar or other archive format) using Web Submit. Your solution should consist the following:

Back to 9874 homepage

Last modified: $Date: 2008-02-06 08:49:46 -0330 (Wed, 06 Feb 2008) $ ($Revision: 325 $) by $Author: dpeters $