skip to Main Content
The smarter way
to do assignments.

Please note that this is just a preview of a school assignment posted on our website by one of our clients. If you need assistance with this question too, please click on the Order button at the bottom of the page to get started.

Question description

Hi, I need help with this memory matching game that I am trying to program. here are the instructions:Select a Theme and have 50 words associated with it:
 Words must have a common theme – your choice
Examples: Like Periodic Table
Elements, or Sports teams, or Types of cars…
Max number characters in each word
is eight(8)
Have one Term describing category/theme you picked. This is
the FACE term…
Menu:
Start Options
· 
New Game Option
· 
Exit Game Option
Level of Play – Use selects at start of game
  4 x 4
grid (Easy)
  6 x 6
grid (Moderate)
  8 X 8
grid (Difficult)
Speed  of Play – At start
of game, User selects time interval for clicked-on term-pair to display
  1
seconds  (Difficult)
  3
seconds (Moderate)
  5
seconds (Easy)
Populate Grid with Term
  At start of game – program places
the same face/theme term in all
squares in the visible grid
If 4 x 4 grid, randomly pick 8 terms, place
each image name twice in
2-Dim array.
If 6 x 6 grid, randomly pick 18 terns, place
each image name twice in
2-Dim array.
If 8 x 8 grid, randomly pick 32 terms, place
each image name twice in
2-Dim array.
The
2-Dim Array corresponds to grid on screen.
During
the course of play, the face/theme term in the grid is replaced by a
  corresponding array  terms,  when user selects a grid square
Game Play
1)  User selects a FIRST square, the theme/face term
 in the grid square is replace with
correspond stored term, from the 2-dim array
2)  User selects a SECOND square, the term theme/face
in the second grid square is replace with the corresponding stored term, from
the 2-dim array
3)  The computer compares the terms for the two selected
squares.
If they are the same, the terms
remain on the screen and can no longer be selected.
If they are different, the term remain the
screen for 1, 3 or 5 seconds, depending on user selection at the beginning of
the game.  After that elapse time, those
two grid terms are replaced with the face/theme term.I’m not entirely sure how to make the gameboard itself or how to double the 50 words and randomize them.And here is my code so far:#include #include #include #include #include #include using namespace std;void gridEasy(void);void randomizeTheme(string theme[]);int main(){string theme[16] = { “a”, “b”, “c”, “d”, “e”, “f”, “g”, “h”, “i”, “j”, “k”, “l”, “m”, “n”, “o”, “p” };int playGame;int grid;bool firstRun = true;cout << "Would you like to play a memory matching game?" << endl;cout << "press 1 to play, press 0 to exit" << endl;cin >> playGame;if (playGame == 1)//if the player wants to play the game, run this line of code{cout << "Please choose your grid: " << endl << endl;cout << "1. 4 x 4 grid (Easy)" << endl;cout << "2. 6 x 6 grid (Medium)" << endl;cout << "3. 8 x 8 grid (Hard)" << endl << endl;cin >> grid;}else if (playGame == 0) {//if the player wants to exit, run this line of codereturn 0;}else{return 0;}if (grid == 1){return 16;}else if (grid == 2){return 32;}else if (grid == 3){return 64;}else{do{cout << "Please choose your grid: " << endl << endl;cout << "1. 4 x 4 grid (Easy)" << endl;cout << "2. 6 x 6 grid (Medium)" << endl;cout << "3. 8 x 8 grid (Hard)" << endl << endl;if (!firstRun){system("CLS");cout << "Not a correct response, please try again." << endl;cin.clear();cin.ignore(INT_MAX, 'n');}firstRun = false;} while (!(cin >> grid));gridEasy();srand(time(0));randomizeTheme(theme);for (int i = 0; i < 16; i++){cout << theme[i] << endl;}system("Pause");return 0;}}void gridEasy(void){for (int r = 0; r < 4; r++){for (int c = 0; c < 4; c++){cout << "-----------------------------" << endl;cout << "|" << setw(9) << r + 1 << setw(9) << "|" << endl;cout << "-----------------------------" << endl;}}cout << "--------------------------------------------------------------------------------";}void randomizeTheme(string theme[]){random_shuffle(theme, theme + 16);}

GET HELP WITH THIS ASSIGNMENT TODAY

Clicking on this button will take you to our custom assignment page. Here you can fill out all the additional details for this particular paper (grading rubric, academic style, number of sources etc), after which your paper will get assigned to a course-specific writer. If you have any issues/concerns, please don't hesitate to contact our live support team or email us right away.

How It Works        |        About Us       |       Contact Us

© 2018 | Intelli Essays Homework Service®

Back To Top