This site will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device.


URI CSC200 Fall 2009



Instructor:
Daniel Ducharme
dducharme@cs.uri.edu
Office: Tyler 136
Wed 12-2 in the lab, or by appointment

LA:
Pankaj Ahire
pankajahire@gmail.com
Office: Tyler 136

TA:
Ben Roberts
ben@cs.uri.edu
Office: Tyler 133
by appointment


Program 2 (100 points):

Objective

The purpose of this assignment is to demonstrate that you have a good grasp of the C++ language as well as some problem solving skills.

Practical

In this assignment you are to implement the game Connect 4. Included is an example program. (WARNING the included executable uses a number of Windows only commands such as system("cls") do not attempt to run on linux or Mac)

This assignment is supposed to be difficult and should be don individually. Your program must make use of functions, classes, and control flow in order to handle this task. There is no starter code so everything is up to you.

Your program must have the following

  • You must be able to play Connect 4 with the correct rules
  • You must correctly identify a win and who wins
  • You must allow people to play again

Here are the rules

  • Player 1 goes first, players will alternate turns after playing a checker.
  • On your turn, drop one of your checkers down ANY of the slots from the top of the grid.
  • Play alternates until one player gets FOUR checkers of his or her color in a row. The four in a row can be horizontal, vertical or diagonal.

You must hand in a hard copy of your code, as well as e-mailing me a softcopy of your code so that I can build it. Please try to avoid using linux only commands as I will be testing this on a Windows machine, but Windows commands such as system("cls") or system("pause") are fine.

Grading

  • (2 points) Your name must be at the top of the main file
  • (3 points) You must have a brief description of the program
  • (15 points) You must use a reasonable number of comments
  • (30 points) The program compiles
  • (50 points) The program executes correctly
  • (1-50 points) For extra functionality

Included Files

Program 2