Title: [C++] /******************************************************************** Write a C Author: Anonymous Pastebin link: http://pastebin.com/yiaesT0J First Edit: Saturday 2nd of February 2013 04:23:30 AM CDT Last Edit: Saturday 2nd of February 2013 04:23:30 AM CDT /******************************************************************** Write a C++ program that implements a memory game where the user is asked to remember colors that are displayed randomly for a short period of time. ********************************************************************/   #include #include #include "graph1.h"     using namespace std;   //Function declarations void getNoColors(int* no_colors); void setColors(int* colors, int no_colors); void getDelay(int* no_secs); void displayColors(int* colors, int no_colors, int delay); void displayColors2(int* colors, int no_colors, int delay); void game(int* colors, int no_colors, int delay);     int main() {         //variable declaration         const int MAX_COLORS = 5;           int no_colors = 0;         int delay = 0;         int no_secs = 0;         int colors[MAX_COLORS];           //display graphics window         displayGraphics();             //assign number of colors         getNoColors(&no_colors);           //set colors randomly         setColors(colors, no_colors);           //get the delay from user         getDelay(&no_secs);         delay = no_secs;                 //perform game         game(colors, no_colors, delay);                     return 0; } //Prompt user for number of colors to display void getNoColors(int* no_colors) {           cout << "Enter the number of colors to display (Between 2 and 5 inclusively): ";         cin >> *no_colors;           if ((*no_colors < 2) || (*no_colors > 5)){                 cout << "Please enter a valid integer between 2 and 5: ";                 cin >> *no_colors;         }     } //Assign colors randomly to each rectangle void setColors(int* colors, int no_colors) {         int i = 0;         int j = 0;         bool duplicate = true;           //Random generator         srand(time(0));           for (i=0; i> *no_secs;           if ((*no_secs < 1) || (*no_secs > 3)){                 cout << "Please choose a valid integer between 1 and 3: ";                 cin >> *no_secs;         }           /*         clock_t endwait;         endwait = clock () + *no_secs * CLOCKS_PER_SEC ;         while (clock() < endwait) {}*/     }   void displayColors(int* colors, int no_colors, int delay) {         for (int i=0; i 125) && (y < 300) && (y > 375) ){                                 if...                         }                   //Set second set of colored boxes as buttons         //Set click event ( leftMouse(x,y) )         //If correct color, previous rectangle is redrawn at original point and +2 is added to score         //Else, -2 from score         //Continues until player has correctly selected all colors as they were in original displayColors function         //Display message with score and time elapsed in graphics window         }