Solved–Programming Assignment #5 –Solution

$35.00 $24.00

Programs are to be submitted to Gradescope by the due date. You may work alone or in groups of two. Programs submitted up to 24 hours late will still be accepted but incur a 10% grade penalty. Uploading your programs to gradescope will immediately score your submission. Your program grade will be the score of…

You’ll get a: . zip file solution

 

 

Description

5/5 – (2 votes)

Programs are to be submitted to Gradescope by the due date. You may work alone or in groups of two. Programs submitted up to 24 hours late will still be accepted but incur a 10% grade penalty. Uploading your programs to gradescope will immediately score your submission.

Your program grade will be the score of the last submission that you have uploaded.

Programs must compile using gcc -Wall without any warnings. Each program that compiles with a warning will incur a 10% grade penalty. Each program will have 5 seconds to compile and run test cases on gradescope.

Problem 1: connectfour (100 points, 9 per test case, 10 pts for Makefile)

In this problem you will write a program that plays connect four. The program should start by asking the user for the dimensions of the board. Two players proceed by dropping coins into the columns. Coins fall to the bottom, and if a player has 4 coins in a row (horizontally, vertically, or diagonally), then that player wins the game. See http://www. connectfour.org/connect-4-online.php if you are unfamiliar with the game.

Skeleton code has been written for you, though you do not need to use it. If you use the skeleton code, you should define the body of main and the body of the functions in gameboard.c. For example output, see example*.txt.

Files to turn in:

  1. connectfour.c

  1. gameboard.c

  1. gameboard.h

  1. Makefile

We must be able to create your code on the command line using make.

1