The web site for Flash ActionScript 3.0 game developers

 
         
   

Found a "bug" in your book!

"} else if (firstCard == thisCard) { // clicked first card again"

p. 99.
if the player clicks on the card again, it suppose to turn the card.
but what if, there are 2 cards open and I click the first one?
this is a bug :)
you should check in this if statement if only one card is open atm:
"} else if (firstCard == thisCard && secondCard == null) { // clicked first card again"

:D



Copyright Gary Rosenzweig