Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 Connect Four in a Line Create a video game version of Connect Four in a Line in C. Connect Four in a Line is

image text in transcribedimage text in transcribed

1 Connect Four in a Line Create a video game version of Connect Four in a Line in C. Connect Four in a Line is a two-player connection game in which the players first choose a symbol, either X's or O's, and then take turns dropping an X or an O into the grid. The grid has seven columns, each column of the grid is labeled A-G, and six os. A player, on their turn, chooses a column from A-G. The grid is oriented vertically such that the symbol, X or O, falls to the lowest available space on the grid. The objective of the game is to be the first to form a horizontal, vertical, or diagonal line of four of one's own symbols. Your C program must . Alternate turns between play X and player . Ask the player which column (A-G) he/she would like to drop their symbol into. When a player chooses a column the symbol must fall to the lowest available space in that column. If the column is full (.e. no more spaces available in that column) then the program mustl the player to choose a different column. . Check for a win condition. Once a valid column is chosen the program must check to see if a line of four is formed, in a row, column, or diagonal. Check for a tie game. It is possible to end in a tie game so your program must checks for this possibility . Announce end game. If a winner is found, or if a tie game is achieved, then the program must announce the end game condition and offer to start a new game. Clear the board and start a new game if the player's choose to play again. . Check for invalid entries after every input. . Allow both upper and lower case inputs (i.e inputs 'B' and 'b' are treated the same) 1.1 Example Situations Below are some sample situations. These are not sample code executions, as one situation is not related to the next. The are snapshots of what might happen during play. Red text indicates information entered by the user 1.1.1 The Game Begins Let's play Conaect Four ia&Line AB CD EF Player 1: ich column would you like to add an 'X' ? Invalid Entry Player 1 Which column would you like to add an 'X ? 1.1.2 Column is Full Let's play Connect Four in Line A B CD EFG I-1 -I | | | | Player 1: Which column vould you lixe to add an X' ?a That Colunn is full Player 1: Which column vould you like to add an 'X

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

28. The new Microsoft Office Suite will go on sale in July.

Answered: 1 week ago