Connect 4 is a board game for 2 players in which the goal is to make a line, or
column, or diagonal, of 4 colored discs in a grid of 6 rows and 7 columns. Each colored
disc is “dropped” in the grid by a player, and falls straight down to the lowest available
position within the column in which it was dropped. In other words, a dropped disc either
falls to the bottom of the column, or onto another disc that had already been dropped in
Each player has 21 discs; one player has blue discs and the other player (in this
case, the computer) has green discs. One after the other, the players drop one disc at a
time in the grid. When a player manages to make a line, column, or diagonal of 4 discs,
the game ends.
What you must do
You must code a game of Connect 4 which is played in a 2D array of 6 rows and 7
columns. A player wins as soon as a line, column or diagonal of 4 discs is made by that
Each spot of the 2D array, like all 2D arrays, has a row-column coordinate. The
program first asks the player which column the disc has to be dropped into, then checks
that it is a valid column, then calculates at which line the disc stops. Of course, as long
as the selected column is not valid, the program asks the player for the number of
another column. Then, for each disc dropped by player 1 or player 2, your program has
to calculate at which line the disc stops.
You must document that game; meaning, you must write a technical design
document for it.
You must also write unit tests for at least 4 functions (one unit test per function).
3 freelancers are bidding on average ₹1683 for this job
Hello, I am interested in coding your Connect 4 game. I have great amount of experience in programming and can do it easily. Message me to get started. Regards, Bassam Muhammad