this a C program instructions: output: Connect Four Redux Connect Four is a two-player board game that's
Fantastic news! We've Found the answer you've been seeking!
Question:
instructions:
output:
Transcribed Image Text:
Connect Four Redux Connect Four is a two-player board game that's fun to play. It's also fun to watch a replay of a game that you just won. Requirements A program is needed to allow two people to play Connect Four on a computer, the same way we did for assignment 4. The difference is that now when the user is prompted to enter 'q' to quit they will also be given the option to enter 'r' for 'replay', or 'rerun' or 'redux'. A replay will show the empty board and then show the moves as they occurred, at a rate that makes it possible to appreciate the win. The user should then be prompted again for a 'q' or an 'r' or anything else. An example run is shown at the end of this document. Design A linked list should be used to record the moves that the players make. A singly linked list can be used and the code should be in a separate file called slist.c and slist.h. A function to insert a new node at the tail will be needed. A function to free the list is also needed. The details of what is stored in each node is up to you. Implementation The program will be written in C. Try to write your program incrementally by first creating the overall structure with empty functions (stubs) and testing often to see that your program is always working as expected. Testing When testing, you are checking to see that the program satisfies the requirements. Remember that when moving through the stages of requirements, design, implementation and testing, it is often necessary to go back to a previous stage and revisit decisions and make changes. It is always better to make design changes early in a project rather than later. Connect Four Redux Connect Four is a two-player board game that's fun to play. It's also fun to watch a replay of a game that you just won. Requirements A program is needed to allow two people to play Connect Four on a computer, the same way we did for assignment 4. The difference is that now when the user is prompted to enter 'q' to quit they will also be given the option to enter 'r' for 'replay', or 'rerun' or 'redux'. A replay will show the empty board and then show the moves as they occurred, at a rate that makes it possible to appreciate the win. The user should then be prompted again for a 'q' or an 'r' or anything else. An example run is shown at the end of this document. Design A linked list should be used to record the moves that the players make. A singly linked list can be used and the code should be in a separate file called slist.c and slist.h. A function to insert a new node at the tail will be needed. A function to free the list is also needed. The details of what is stored in each node is up to you. Implementation The program will be written in C. Try to write your program incrementally by first creating the overall structure with empty functions (stubs) and testing often to see that your program is always working as expected. Testing When testing, you are checking to see that the program satisfies the requirements. Remember that when moving through the stages of requirements, design, implementation and testing, it is often necessary to go back to a previous stage and revisit decisions and make changes. It is always better to make design changes early in a project rather than later.
Expert Answer:
Answer rating: 100% (QA)
To create a program for Connect Four Redux which includes the ability to play the game replay the game and record moves using a linked list you can follow these steps Define the Data Structures Create ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
10 You are looking at an investment that will pay $1200 in 5 years if you invest $1000 today. What is the implied rate of interest? A. What Formula would you use to find the answer? Show the formula...
-
Explain how the calculation of the standard deduction limits the ability to shift income to a dependent.
-
Find the Force Magnitude, Rotational Component, Torque, and Nonrotational component for the: - upper arm weight - lower arm weight - hand and DB weight - muscular force Shoulder Isometric hold at 90...
-
Refer to the information in QS 19-16. The company sells its product for $50 per unit. Due to new regulations, the company must now incur $2 per unit of hazardous waste disposal costs and $8,500 per...
-
On November 1, 2013, Norwood borrows $ 200,000 cash from a bank by signing a five-year installment note bearing 8% interest. The note requires equal total payments each year on October 31. Required...
-
The conclusions reached by Brewster et al (2005) after their extensive research were that: Our study has revealed an increasing emphasis on globalizing HR processes, with intense discussion around...
-
What is the total stockholders equity based on the following account balances? Common Stock $ 1110000 Paid-In Capital in Excess of Par 43000 Retained Earnings 173000 Treasury Stock 23000 $ 1174000 ....
-
You have taken over a number of accounts of another salesperson, Lee Bizon. Most of these accounts are prospects, which means that they have not yet purchased from NewNet. Two accounts did purchase...
-
a. What is target costing? b. Suppose a hospital was offered a capitation rate for a covered population of $40 per member per month (PMPM). Briefly explain how target costing would be applied in this...
-
Julio Melara, introduced at the beginning of this chapter, has achieved success in several different sales and marketing positions in the fields of radio broadcasting and publishing. Today, he is...
-
You see an urgent advertisement for a sales manager at a leading city center hotel. The requirements include the following: i. Have 3+ years experience in a B2B sales capacity, ideally within...
-
The following information is available for Mods Media Ltd. Required (a) Calculate the following ratios for 2020 and 2019: i. debt ratio ii. equity ratio iii. capitalisation ratio. (b) What do these...
-
Number 11.16. Please help me IP UP celeration if the point lies on the Z-axis? 11.16. The equation for rotational motion about the center of mass is dL/dt = T, where L is the angular momentum and T...
-
Determine which of the following limits exist. Compute the limits that exist. lim x-0 1- + 3x X
-
Cogesco purchased 75% of the capital of Securenet for $250,000 on January 1, 2008. At this date the equity of Securenet was: Share capital......... $100,000 Retained earnings...... 100,000 At this...
-
On December 31, 2010, Peat Limited purchased 70% of the outstanding common shares of Soap Limited for $7 million. On that date, Soaps shareholders equity consisted of common shares of $5 million and...
-
On January 1, 2013, Serpens Ltd. acquired the issued shares (cum div.) of Vela Ltd. for $120,000. At that date, the nancial statements of Vela included the following items: Share capital...
-
Discuss the impact of hedge fund regulation on hedge funds ability to deliver positive alpha to hedge fund investors.
-
Discuss the main methods used to identify operational risks in financial institutions such as hedge funds.
-
Explain how an organization can be assured that operational risks in outsourced processes are addressed and managed properly and according to an organizations standards.
Study smarter with the SolutionInn App