     private func transformCards() {
         self.transformedCardCenters = []
         
-        for (i, cardView) in self.cardViews.enumerate() {
+        for (i, cardView) in self.deck.enumerate() {
             cardView.transform = self.getCardViewTransformForIndex(i)
             cardView.anchorTo(self.deckViewAnimationManager.deckViewAnchor)
             self.transformedCardCenters.append(cardView.center)

    }
    
    func cardView(cardView: EPCardView, cardViewMovedTo cardViewEndPoint: CardViewEndPoint) {
        let cardViewsToTransform: [EPCardView] = Array(self.cardViews.suffixFrom(self.topCardIndex))
        
        for (i, cardViewToTransform) in cardViewsToTransform.enumerate() {
            

    //  Holds the index of the top card on the deck view.
    private(set) var topCardIndex: Int = 0 {
        didSet {
            for cardView in self.deck {
                cardView.userInteractionEnabled = false
            }
            
            if self.topCardIndex < self.deck.count {
                self.deck[self.topCardIndex].userInteractionEnabled = true
            }
        }
    }
    
    //  Calculated cards' tranformations (angle, scale, alpha & center position) are stored in these arrays.
    private(set) var deck: [EPCardView] = []
    private(set) var cardAnglesDegrees: [CGFloat] = []
    private(set) var cardScalePercentages: [CGFloat] = []
    private(set) var cardAlphas: [CGFloat] = []
