                     flipHidden = true;
                 }
             } else {
-                if(fromLocation!.y == solitaireScene.bottomRowYPos || fromLocation!.x == solitaireScene.wastePileLocation.x) {
+                if(fromLocation!.y == solitaireScene!.bottomRowYPos || fromLocation!.x == solitaireScene!.wastePileLocation.x) {
                     let cardsAbove = getAboveCards(touchedPile!);
                     
                     for index in 0..<cardsAbove.count {

    let backTexture: SKTexture
    var faceUp: Bool
    
    var solitaireScene: SolitaireScene
    var solitaireGame: Solitaire
    
    var toLocation: CGPoint?        // Where the user lifted their finger
    var fromLocation: CGPoint?      // Where the user began dragging
    
    var newPile: StackPile?         // Pile to which the user dragged
    var oldPile: StackPile?         // Original pile from which the user dragged
    
    var touchedHidden = false;      // Did the user touch a card that was face down?
    var flipHidden = false;         // Should the hidden card be flipped?

    * Otherwise, card all cards in the moved stack to the new stack.
    */
    override func touchesEnded(touches: Set<UITouch>, withEvent event: UIEvent?) {
        let touchedPile = solitaireScene!.CGPointToPile(fromLocation!);
        
        // test for where the card was touched
        toLocation = solitaireScene!.snapToCGPoint(position)
        
        // find where the card is going to and where it is coming from
        newPile = solitaireScene!.CGPointToPile(toLocation!)
        oldPile = solitaireScene!.CGPointToPile(fromLocation!)
        
        if(touchedHidden) {
            if(flipHidden) {
                if(newPile!.name == solitaireGame!.deck.name && oldPile!.name == solitaireGame!.deck.name) {
                    drawCard();
                } else {
                    flipCardOver();
