Question: 4. (20 points) Write a C program to play a version of connect-4 where the board orientation changes. The first players token goes down in

4. (20 points) Write a C program to play a version of connect-4 where the board orientation changes. The first players token goes down in a column until it hits the bottom or another token, Then, the next players token goes as far leftward in a row until it hits the left edge or another token. This process repeats for tokens moving up in a column and then rightward in a row. The directions continue to rotate in this way (down, left, up, right). The players alternate between R and B. This is played on a 10 by 10 board and your program should print the board after each turn, labelling the rows or columns for the next choice with 09 at the direction from which the piece is coming. (So the labels will be above the board when the piece will move down, to the right of the board when the piece will move leftward, etc.) Dont worry about detecting a victory condition; just play until one of the players uses Control-c to kill the program. (Im making this idea up so im not quite sure how to make it a game...)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!