CMSC 201 Connect 4 Out: Wednesday 2/25/04 The design document for this project,
design2.txt , |
The game Connect 4 is a popular game sold in both full-size and travel sizes. The board is vertical and forms a grid that is 6 rows high by 7 columns wide. This game is played by two players, each with their own color of checkers (either red or black). Checkers are dropped into the columns by each of the players in turn. The object of the game is to be the first player to get 4 of your checkers in a row, either horizontally, vertically, or diagonally.
Play begins by one player choosing a column in which to drop a checker. Since this is the first play, the checker will fall to the bottom of that column. The other player then gets to drop one of his checkers into the column of his choice. If player #2, your opponent, chooses to drop his checker in a different column than you did, it will fall to the bottom of that column. If he chooses the same column as you did then his checker will land just above yours. So the rule of placement is that the checker will fall down the column as far as it can.
If you would like to practice playing the game so that you understand it, I have found a version of it on the web that will allow you to play against the computer. Practice Playing Connect 4
Design and code a project that will allow you to play Connect 4 against the computer.
Although your output need not be identical to that in the output file, all information (including a greeting and instructions that are not shown in the output) must be present. In TEST mode, using the same seed as I did, and entering the column choices in the same order should produce the same game with the same results for your project.
Please be aware that this may NOT be a complete test of the program.
You are to use seperate compilation for this project, so you will be
submitting a minimum of three files.
Your C source code file that
contains main() MUST be called proj2.c. I would expect
that you would also have files called connect4.c and connect4.h, but you
may choose to have additional .c and .h files.
To submit your project, type the following at the Unix prompt. Note that the project name starts with uppercase 'P'.
submit cs201 Proj2 proj2.c connect4.c connect4.h (and possibly other files, separated by spaces)
To verify that your project was submitted, you can execute the following command at the Unix prompt. It will show all files that you submitted in a format similar to the Unix 'ls' command.
submitls cs201 Proj2