     
     func byChangingType(newType: PieceType) -> Piece {
         
-        let piece = Piece(type: newType, color: color)
-        piece.tag = tag
+        let piece = Piece(type: newType, color: color, tag: tag)
         return piece
     }
 }

        }
    }
    
    open let type: PieceType
    open let color: Color
    open var tag: Int!
    public var hasMoved = false
    
    lazy var movement : PieceMovement = PieceMovement.pieceMovementForPieceType(pieceType: self.type)

    public init(type: PieceType, color: Color){
        self.type = type

        self.tag = Piece.lastAssignedTag
    }
    
    public init(type: PieceType, color: Color, tag: Int){
        self.type = type
        self.color = color
        self.tag = tag
    }

    func value() -> Double {
        
        switch type {
