Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MUST BE DONE IN RAPTOR For this project, you will be making a Follow the Queen game. The premise of this game is there are

MUST BE DONE IN RAPTOR For this project, you will be making a Follow the Queen game. The premise of this game is there are 4 cards--3 kings and 1 queen. Your program will shuffle the cards at least 20 times, very briefly displaying the status after each shuffle. Then, the user must guess which card is the queen. You will put all of this in a loop so the user can play as many times as they like. I have provided a sample Raptor file in the project 2 section of the modules page so you can get an idea of how to create the array and display the cards. This example also illustrates how to use the Clear_Console and Delay functions in Raptor. The minimum program requirements are: InitCards procedure (cards array is the parameter variable) - Create a procedure that will use the Random function to generate a random number in the range 1 - 4. Then, use a loop to assign either a "K" or a "Q" to each element of the cards array. The "Q" will go in the index specified by the random number that was generated. ShowCards procedure (cards array is the parameter variable) - Provided for you, no changes necessary CheckUserGuess procedure (cards array is the parameter variable) - Create a procedure that will ask the user to guess where the queen is by inputting a number 1 - 4. Include an input validation loop that makes sure the user input is in the proper range. Then, use an If statement to determine if the user's guess is correct. Lastly, you can call ShowCards to display the final position of the cards so the user knows where the cards were. Main procedure - Begin by calling InitCards and then create a loop that iterates a minimum of 20 times. Each iteration of the loop should display the cards (call ShowCards), delay very briefly, clear the screen, then shuffle the cards (call InitCards). When this loop is finished, you will call CheckUserGuess to complete the game. All of this will be inside a Do...While loop that will ask the user if they want to play again. If the user selects yes, the game will repeat, if the user selects no, the game will exit. Again, these are the minimum requirements. If you want to add some features--such as a counter of how many wins/losses the user has, you are welcome to do that. Please make sure you perform all validation and follow all of these requirements to get full credit for the project.

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

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions

Question

differentiate the function ( x + 1 ) / ( x ^ 3 + x - 6 )

Answered: 1 week ago

Question

Timeline for final evaluation

Answered: 1 week ago

Question

How will it be used?

Answered: 1 week ago