CS 1704 Spring 2004 

Project 1:  Multiplayer Checkers


Purpose:

1.                  To verify that all students have the basic knowledge required to continue in cs1704, and
2.                  To introduce software development testing principles.

Requirements:

For this project, I will require:

1.                  A 3-dimentional array to represent the the mutliplayer checkerboard
2.                  A struct to represent a piece
3.                 enums to represent red vs. black and pawn vs. king
4.                  At least 1 switch statement,
5.                  At least 1 for loop,
6.                  At least 1 while loop,
7.                  At least 1 stringstream (example posted here),
8.                  You may not use classes, and
9.                  You may not use dynamic data.

In addition to the above requirements that you should already be familiar with, the following requirement will be taught the first week of class:

 10.              You must use at least 3 testing switches, named 1 2 and 3

The Project

You will be implementing a console, command line based multiplayer checkers game.  As stated in the requirements above, multiple checkerboards will be represented in memory as a 3D array of structs.  Think of each checkerboard as a layer.  Each layer is a checkerboard.  Each struct will contain two members, the piece and the player.  The player can be either red or black and the piece can be either king or pawn.  You will use two enum's, one for the the players and one for the pieces.  

When a player tries to make a move you will make sure the piece is following the following rules.  (Some versions of checkers have other rules, for example, that if a jump exists you must jump. Do not enforce these other rules or your program will be incorrect.)  If you are totally unfamiliar with checkers, see http://www.darkfish.com/checkers/Checkers.html for some basic hints.

You will have to change the values of the members of the structs when a pawn becomes a king.

In addition, you will read commands from a file named checkers_in.dat.  Each line represents a command.  There may be blank lines in the file.  In such cases, simple skip the line.

load<ws><levels>

move<ws><level><ws><color><ws><x1><ws><y1><ws><x2><ws><y2><ws>

print<ws><level>

quit

Design Document

  1. Design your project using Structure Charts and submit before 11:59pm of Wednesday, January 28th, 2004.  (We will learn about Structure Charts in class.)
  2. You do NOT need to model the filestreams or stringstream, however you may.
  3. Use a Word Document (or Visio) to create the charts.
  4. Print out a hard copy to turn in on Friday, January 30th, 2004 during class.

Standards:

As with all programming projects in this course, please see http://courses.cs.vt.edu/~cs1704/spring2004/standards.htm for a list of requirements that apply to all projects.  YOU WILL BE GRADED on these.  In addition, include the following pledge at the bottom of your .cpp file:

On my honor:

- I have not discussed the C++ language code in my program with anyone other than my instructor or the teaching assistants assigned to this course.

- I have not used C++ language code obtained from another student, or any other unauthorized source, either modified or unmodified.

- If any C++ language code or documentation used in my program was obtained from another source, such as a textbook or course notes, that has been clearly noted with a proper citation in the comments of my program.

- I have not designed this program in such a way as to defeat or interfere with the normal operation of the Curator System.
<Your Name>

Submission

Name your file <yourpid>.cpp and submit before 11:59pm of Monday, February 2, 2004.  To receive credit, your assignment must be submitted before the time and date listed above. The curator can only accept a limited number of submissions per minute, so curator lag is not an excuse for submitting late. It is your responsibility to successfully submit your assignment via the curator, so plan to submit early.  A maximum of 3 submissions is allowed per student, so DO NOT USE THE CURATOR FOR TESTING!  Only the final submission will be graded, not your highest grade.

          Submit to:  http://www.cs.vt.edu/curator/