Coder Profile - Show off your skills, get a coder profile.
 
 
 
The Author
Mark_Brodie
Mark Brodie
Send A Message
Rating
9.00
out of 10
( 1 Ratings )
Please login to rate source codes.

Click here to register a free account with us.
General Details
Visual Basic
Posted 184 Days Ago
243 Views
Received 1 Rating
More Codes By This Author
A full game - Concentrati...

A full game - Concentration


Description
Write a VB application that implements a game of Concentration. In a game of Concentration, the player is presented with a board containing some number (24 in my implementation) of "covered" images. The player clicks on the covered pictures in sets of two to reveal the randomly assigned pictures beneath. If the two pictures match, they remain displayed; if not, they are flipped back over. The goal of the game is to reveal all matches (12 in my implementation) in as short a time as possible.



The program must maintain (in a file) the best time and display it on the screen as the "time to beat". Whenever the best score is beat, the new time becomes the best score and should be written out to the file.



My implementation also tracks the number of turns it took to reveal all matches (the fewer the better). A perfect score would be 12 in my implementation (but a score of 12 turns would be nearly impossible, as the player would have make 12 correct guesses in a row).



My implementation of the game is shown below. I am using playing cards as the pictures.



When the game first starts, all cards are shown face down. The "Best Scores" area shows the previous best time and number of turns, read in from a file. (Note: The "Reset" button effectively clears the best scores – it sets the best time to 99:99 and the number of turns to 9999.) The clock for "This Game" has started ticking.

In the middle of game play, the pairs that have been matched remain face up, those yet to be matched remain face down. The clock is still ticking (one minute, 20 seconds – looks like we're not going beat the best time of one minute, 14 seconds!).

At the end of the game, all cards will be face up and the clock will stop ticking.
Technical
REQUIRES VISUAL BASIC 6.0
Source Code
Download Download Source Code
concentration.zip ( 0.27Mb )
NEVER open a .exe, .bat, .cmd, or other executable file since that is where viruses are likely to live. Please virus scan all files you download.
Comments
Please login to post comments.
 
Mark_Brodie     Posted 183 Days Ago
 
 
I have been on the forums but i only post on the forums now and again.

I'm actually going to be haing my own website soon if i ever find someone that
will help me make one.

The URL is http://www.vb6tuts.co.uk.

Kind Regards

Mark Brodie
 
VBAssassin     Posted 184 Days Ago
 
 
Hey mate, thats really cool!!! I love seeing games made in VB. You may find the ones
i made years ago in VB6 quite interesting to look at. Such as "Falling
Blocks" and you may find the "Binary Clock" quite interesting (the
physical one is on thinkgeek.com).

Keep up the work :-)

Kind regards,
Scott

P.S. Have you checked out the forums yet?
Page 1 of 1
More "Visual Basic" Source Codes By This Author
Recently Posted "Visual Basic" Source Codes
Recently Rated "Visual Basic" Source Codes
 
 
Latest News About Coder Profile
Coder Profile Poll
What is the next application you would like to be added to your profiles?

Books
Coding Challenges
Project Management
Blog
Tutorials


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
5 Days Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2008, Scott Thompson, All Rights Reserved