Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSCE 1030 Project 3 Due: 11:59 PM on Friday, March 30, 2018 PROGRAM DESCRIPTION In this C++ program, you will use concepts from Chapters 5

image text in transcribed
image text in transcribed
image text in transcribed
CSCE 1030 Project 3 Due: 11:59 PM on Friday, March 30, 2018 PROGRAM DESCRIPTION In this C++ program, you will use concepts from Chapters 5 and 6 in zyBooks to create 1030 Connect where the object of this game is to connect four discs in a row, either horizontally or vertically before your opponent (i.e., the computer) does. The game board has a fixed number of 6 columns while the number of rows varies between 4 and 6, inclusively, based on input from the user REQUIREMENTS .As with all programs in this course, your program's output should initially display the department and course number, your name, your EUID, and your e-mail address. This functionality will be implemented using a function that you call from your main ) function. You will display an introductory message, giving basic details and rules of the game (see SAMPLE OUTPUT). This functionality will also be implemented using a function that you call from your main) function. . . You will declare a global enumerated data type that will support three values: (1) an available space (i.e., a space on the game board that does not have a RED or BLUE disc placed in that location), (2) a RED disc occupying that location, and (3) a BLUE disc occupying that location. Note that your enum type may support additional elements as needed for the implementation. You will prompt the user to enter the number of rows on the board between 4 and 6 rows, inclusively. If the user enters an invalid value outside of this range, you will print out an error message and repeatedly continue to prompt the user to enter the number of rows on the board until a valid value is entered. . .Then, you will declare a local two-dimensional array to represent the 4-to-6 by 6 game board (i.?., that is, the board can be 4-by-6. 5-by-6, or 6-by-6) where the array base type is the enum type you declared earlier. This array should be passed as a parameter to the various functions that require access to the array such as updating or printing the array The number of columns of the game board should be declared as a constant, but it is up to you whether or not it is a local or global constant. .You will initialize the board using a function, passing in your two-dimensional arrays and the number of rows. This function will simply initialize each position on the board to the enumerated type representing some initial value, which might be a on the game board (see SAMPLE OUTPUT). This functionality will be implemented using a function that you call from your main) function. You will add a Boolean value-returning function to update the board after a valid column is entered either by the user or computer so as to return a Boolean value to indicate whether or not the game is over ie., if the user or computer place four consecutive discs in a row vertically or horizontally). You will use this Boolean result in your main ) function to determine if the game should continue 1 of 15 CSCE 1030 Project 3 Due: 11:59 PM on Friday, March 30, 2018 PROGRAM DESCRIPTION In this C++ program, you will use concepts from Chapters 5 and 6 in zyBooks to create 1030 Connect where the object of this game is to connect four discs in a row, either horizontally or vertically before your opponent (i.e., the computer) does. The game board has a fixed number of 6 columns while the number of rows varies between 4 and 6, inclusively, based on input from the user REQUIREMENTS .As with all programs in this course, your program's output should initially display the department and course number, your name, your EUID, and your e-mail address. This functionality will be implemented using a function that you call from your main ) function. You will display an introductory message, giving basic details and rules of the game (see SAMPLE OUTPUT). This functionality will also be implemented using a function that you call from your main) function. . . You will declare a global enumerated data type that will support three values: (1) an available space (i.e., a space on the game board that does not have a RED or BLUE disc placed in that location), (2) a RED disc occupying that location, and (3) a BLUE disc occupying that location. Note that your enum type may support additional elements as needed for the implementation. You will prompt the user to enter the number of rows on the board between 4 and 6 rows, inclusively. If the user enters an invalid value outside of this range, you will print out an error message and repeatedly continue to prompt the user to enter the number of rows on the board until a valid value is entered. . .Then, you will declare a local two-dimensional array to represent the 4-to-6 by 6 game board (i.?., that is, the board can be 4-by-6. 5-by-6, or 6-by-6) where the array base type is the enum type you declared earlier. This array should be passed as a parameter to the various functions that require access to the array such as updating or printing the array The number of columns of the game board should be declared as a constant, but it is up to you whether or not it is a local or global constant. .You will initialize the board using a function, passing in your two-dimensional arrays and the number of rows. This function will simply initialize each position on the board to the enumerated type representing some initial value, which might be a on the game board (see SAMPLE OUTPUT). This functionality will be implemented using a function that you call from your main) function. You will add a Boolean value-returning function to update the board after a valid column is entered either by the user or computer so as to return a Boolean value to indicate whether or not the game is over ie., if the user or computer place four consecutive discs in a row vertically or horizontally). You will use this Boolean result in your main ) function to determine if the game should continue 1 of 15

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

More Books

Students also viewed these Databases questions

Question

5-8 What are the advantages and disadvantages of the BYOD movement?

Answered: 1 week ago