Program #6 Implementing CONNECT 4

$24.99 $18.99

(85 points) Problem Statement Write a C++ program that plays the game of CONNECT 4. The game is very simple and you can view the instructions online here (https://www.hasbro.com/common/documents/dad2614d1c4311ddbd0b0800200c9a66/DE3C8F8050569047F5AA9FBB9F16909B.pdf) . You can also find online implementations if you want to see the game in action. One specific online implementation is at: https://www.mathsisfun.com/games/connect4.html (https://www.mathsisfun.com/games/connect4.html) Your game…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Categorys:

Description

5/5 – (2 votes)

(85 points) Problem Statement

Write a C++ program that plays the game of CONNECT 4. The game is very simple and you can view the instructions

online here

(https://www.hasbro.com/common/documents/dad2614d1c4311ddbd0b0800200c9a66/DE3C8F8050569047F5AA9FBB9F16909B.pdf)

.

You can also find online implementations if you want to see the game in action. One specific online implementation is at: https://www.mathsisfun.com/games/connect4.html (https://www.mathsisfun.com/games/connect4.html)

Your game will allow 1-2 players, and at the end, you need to ask if the user(s) want to play again. Traditionally there are yellow tokens and red tokens. They are inserted into a grid and the first player to get 4 adjacent tokens (horizontally, vertically, or diagonally) wins.

Command Line Arguments

Command line arguments will be used to indicate the number of players as well as the size of the playing grid. The three command line instructions will be provided in the following order: number of players, number of columns, number of rows. A 2 player game implies that two humans will be present and the program will allow each player to take turns. A one player game implies that the human is playing against the computer (see One Player Operation for more details).

Example command to start a 2-player game with 7 columns and 6 rows:

(https://web.engr.oregonstate.edu/~goinsj/resources/general/cpp_style_guideline.pdf) for this class. Remember that an important part of computer programming is making sure that your work is easily understandable by other programmers.

Program #6 Implementing CONNECT 4
$24.99 $18.99