     }
  */
 }
+
+
+infix operator ≈≈≈: ComparisonPrecedence
+func ≈≈≈(lhs: CGFloat?, rhs: CGFloat?) -> Bool {
+    guard let lhs = lhs, let rhs = rhs else {
+        return false
+    }
+    let l = String(format: "%.5f", lhs)
+    let r = String(format: "%.5f", rhs)
+    return l == r
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

    
    override func layoutSubviews() {
        super.layoutSubviews()
        let subViewWidth = self.frame.width / space.cols.f
        let subViewHeight = self.frame.height / space.rows.f
        for imageView in imageViews {
            let currenRow = imageView.tag / Int(space.rows)
            let currenCol = imageView.tag % Int(space.rows)
            imageView.frame = CGRect(x: subViewWidth * currenCol.f, y: subViewHeight * currenRow.f, width: subViewWidth, height: subViewHeight)
        }
    }
    
    func imageViewClick(ges: UIGestureRecognizer) {
        // 移动图片
//        let tapImageView = ges.view
//        
//        let tapFrame = tapView?.frame
//        let isOnTheSpaceTop = tapFrame?.minX == lastRect?.minX && tapFrame?.maxY == lastRect?.minY
//        let isOnTheSpaceBottom = tapFrame?.minX == lastRect?.minX && tapFrame?.minY == lastRect?.maxY
//        let isOnTheSpaceLeft = tapFrame?.maxY == lastRect?.minX && tapFrame?.minY == lastRect?.minY
//        let isOnTheSpaceRight = tapFrame?.minX == lastRect?.maxY && tapFrame?.minY == lastRect?.minY
//        
//        if isOnTheSpaceTop || isOnTheSpaceLeft || isOnTheSpaceRight || isOnTheSpaceBottom {
//            let toRect = lastRect
//            lastRect = tapView?.frame
//            for constraint in self.constraints {
//                guard constraint.firstItem.isEqual(tapView) else {
//                    continue
//                }
//                if constraint.firstAttribute == .top {
//                    constraint.constant = (toRect?.minY)!
//                }else if constraint.firstAttribute == .left {
//                    constraint.constant = (toRect?.minX)!
//                }
//            }
//            print("count = \(self.constraints.count)")
//        }
    }

    /*

    
    init(space: Space) {
        self.space = space
        isSetupSubViews = false
        super.init(frame: .zero)
        
        for i in 0..<Int(space.rows * space.cols - 1) {
