 class GameScene: SKScene {
     override func didMoveToView(view: SKView) {
         /* Setup your scene here */
-        //        let myLabel = SKLabelNode(fontNamed:"Chalkduster")
-        //
-        //        myLabel.text = "Hello, World!";
-        //        myLabel.fontSize = 65;
-        //        myLabel.position = CGPoint(x:CGRectGetMidX(self.frame), y:CGRectGetMidY(self.frame));
-        //
-        //        self.addChild(myLabel)
         let center = CGPoint(x:CGRectGetMidX(self.frame), y:CGRectGetMidY(self.frame))
 
         for s in [sprite1, sprite2, sprite3, sprite4] {

        for touch: AnyObject in touches {
            let location = touch.locationInNode(self)

//            let action = SKAction.moveTo(location, duration: 1)
//            sprite1.runAction(SKAction.repeatAction(action, count: 1))

            selected[touch as UITouch] = nodeAtPoint(location)


        }
    }


//    override func touchesMoved(touches: NSSet, withEvent event: UIEvent) {
//
//        for touch: AnyObject in touches {
//            let location = touch.locationInNode(self)
//
//            let action = SKAction.moveTo(location, duration: 0.01)
//
//            // This doesn't really work that well, but it demonstrates how to move sprite4 conditionally. 
//            for (node, t) in selected {
////                if t == touch {
//                    node.runAction(SKAction.repeatAction(action, count: 1))
////                }
//            }
////            if sprite4_selected {
////                sprite4.runAction(SKAction.repeatAction(action, count: 1))
////            } else {
////                sprite2.runAction(SKAction.repeatAction(action, count: 1))
////            }
//        }
//    }

    override func touchesEnded(touches: NSSet, withEvent event: UIEvent) {
        for touch: AnyObject in touches {
            let location = touch.locationInNode(self)

            selected[touch as UITouch] = nil

//            let action = SKAction.moveTo(location, duration: 1.0)
//            sprite3.runAction(SKAction.repeatAction(action, count: 1))
        }
    }


    override func update(currentTime: CFTimeInterval) {
        /* Called before each frame is rendered */


    }

    // TODO: How can I use this variable in the definitions below?
    let sprite_size = CGSize(width: 30, height: 30)

    let sprite1 = SKSpriteNode(color: UIColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0), size: CGSize(width: 30, height: 30))
    let sprite2 = SKSpriteNode(color: UIColor(red: 0.0, green: 1.0, blue: 0.0, alpha: 1.0), size: CGSize(width: 30, height: 30))
