Question: Please help with C Your assignment: Create a program that models the structure above. Create functions: . . . Initialization - print Setting up the
Please help with C

Your assignment: Create a program that models the structure above. Create functions: . . . Initialization - print "Setting up the game". Teardown - print "Destroying the game" Accept Input - accept two numbers, from 1 to some limit (I suggest 20 to 40, make sure it is even). Make sure that the person doesn't pick the same number twice. O should quit the game (using the flag mentioned in "main"). Prompt the user so that they understand what you expect. Update the state of the world - pass the numbers to this function. Since we do not have a "world" right now, picking a number and its double (5 and 10, for example) is a match. This method must not print anything. It only does calculations. Results from here update the "global state." This function should update a global score variable. Display the state of the world - Print the result calculated in the state of the world (match or no, score). Main - call initialization, then loop until a flag is set, calling accept input, update and display. Outside of the loop, call teardown. . You should use a constant for the size of the board. You must submit buildable C source code to get credit for this assignment. Hints: Start early. Don't wait until it is due - you won't have time to ask questions or get help. Don't write too much code - my solution is about 100 lines of code. If you go TOO much over that, you have done it really wrong. Shorter isn't better, but longer isn't better either. I suggest using scanf for input and print for output. Write extra helper functions if you find yourself copy/pasting code. One mistake that people often make is to have acceptinput call UpdateWorld which then calls DisplayState. This is not correct. Each of these functions are called by the game loop. There will be more assignments based on this assignment. Mistakes here will have to be fixed later
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
