Concentration+Game

=How good is your memory? = = =

The old Concentration Game from vintage television In this project, you will create a memory game based on the "Concentration Game". The object of the game is to find all the matches that are covered by the numbered buttons. The first button you click on will disappear and show you the icon, image, word, etc. that is under it. The second button that you click will do the same and if it's contents matches the contents that was under the first button then they will completely disappear and display part of the word puzzle, saying, or picture that is stored beneath the matrix of buttons. If you picked two and they do not match, then they are recovered and the next tries begins. A counter will keep track of your trials (just to keep track of your skill level). The objective of course is to match all the pairs in the least amount of tries. I will give you a few more details and hints to follow ... Happy Gaming! **Learning Items Addressed:** This project will combine variables, arrays, nested For-Next Loops, While Loops and Boolean Switches, System Function Calls, Local Functions, and the design of the User interface with Buttons, TextBoxes, and Labels. And don't forget Problem Solving! **Data Structures:** I know you are asking yourself, What **Global Variables** should I declare in my program? You may want to use **Picked** and **FirstPicked** as Boolean Switches. **WordPair(48)** as a list for integers that are paired. **WordList(24)** as string to hold the words that you will show on the TextBox.Text (under the button) **Pic1** and **Pic2** as integers that will hold the number of the buttons picked during each turn **Screen Design:** You will have Six Rows and Eight Columns of TextBoxes numbered from txt1 to txt48. You will have the same number and size buttons covering those TextBoxes numbered from btn1 to btn48 (corresponding naturally). You will need to have at least one additional button to start the game by initializing the lists. **Hints:** Put the Textboxes on the screen first and assign the matching (randomly selected) word-pairs on the screen before you ever place a single button to cover up the TextBox. This will greatly assist you in debugging. Use the two function calls: **System.Windows.Forms.Application.DoEvents** **Threading.Thread.Sleep(3000)** To allow the user to have three seconds to see what is underneath the second button you selected. The following is a section of code that will help you in assigning the pairs of numbers to your data structure **"WordPair".** ' ============================================================= Assign Pairs of Numbers to List Private Sub InitWordPair Dim P As Integer Dim I As Integer

 For I = 1 To 48  WordPair(I) = 0 ' Clear out the Old Matches in list  Next I

 Randomize ' Call to re-seed the Random Number Generator  For I = 1 To 24  ' This nested loop assigns number pairs to the list "WordPair"    For j = 1 To 2  ' Note: each integer from 1 to 24 is assigned twice (since we need a pair).  Picked = False While (Not Picked) P = Int(Rnd * 48) + 1 If WordPair(P) = 0 Then WordPair(P) = I Picked = True End If End While Next J Next I

 MoveWordsToTextBoxes

 End Sub <span style="font-family: 'Comic Sans MS',cursive; font-size: 120%;">Remember, Start with your TextBoxes showing the matching words before you place the buttons over them !!!