ABSTRACT

When the class is instantiated, it creates a list of all the cards on the Stage and stores them in a vector. It also creates another vector of length 2 that will store up to two cards that have been clicked. The game then shuffl es and activates the cards, which we will look at next. protected function shuffl eCards():void { var shuffl edList:Vector. < MemoryCard > = new Vector. < MemoryCard > ();

The shuffl edCards method does very much what you would expect; it creates a new list having randomly pulled from the original list. The two activation methods enable and disable mouse input, respectively. This is so the game can manage user input more easily and prevent impatient clicking from breaking the game logic.