UnderwareDESIGN

PlayBASIC => Resources => Source Codes => Topic started by: kevin on April 07, 2009, 01:15:24 PM

Title: Card Match (Memory Game)
Post by: kevin on April 07, 2009, 01:15:24 PM

  Card Match (Memory Game)

     This example is  a version of the classic memory game, where you flip cards to find the matching  pairs.  Each time a pair is located, you're awarded a score.  When all pairs are matched you win!

     Pretty simple game mechanic, but it can be a pretty enjoyable little  game.     Have Fun!
Title: Re: Card Match (Memory Game)
Post by: geecee on April 07, 2009, 06:48:00 PM
Nice one kevin.

From where did you get your inspiration?

I thought the purpose of the forums was to share programming information and ideas so why the

QuoteCopyright 2009 by Kevin Picone, All Rights Reserved.

Does this mean that I cannot use any part of the code in one of my programmes?

:-\
geecee
Title: Re: Card Match (Memory Game)
Post by: geecee on April 09, 2009, 07:36:27 PM
Question for kevin

QuoteDoes this mean that I cannot use any part of the code in one of my programmes?

???
geecee
Title: Re: Card Match (Memory Game)
Post by: kevin on April 09, 2009, 10:56:45 PM

of course you can.
Title: Re: Card Match (Memory Game)
Post by: geecee on April 10, 2009, 01:10:19 AM
Thanks for your reply kevin.

Just wanted to clarify.

I can read and understand (I think) the code except for where there is a dot or period "."

What does this do as in the following piece of code ...... Is there something in the help files to explain?

[pbcode]                                    
 // Check if this card needs to change from selection state to a new state
 if Cards(ThisCard).ChangeStateTime<>0
   if CurrentTime>Cards(ThisCard).ChangeStateTime
     Cards(ThisCard).State=Cards(ThisCard).NewState
     Cards(ThisCard).ChangeStateTime=0                                    
     Cards(ThisCard).NewState=0
   endif
   inc StateChangesCount
 endif
[/pbcode]



:)
geecee
Title: Re: Card Match (Memory Game)
Post by: kevin on April 10, 2009, 06:30:59 AM

  They're User Defined Types 

  Learn about them under Help -> About -> Types