 
 class Split extends Piece
 	setSection: (section) ->
-		@connections.B = new Connection(@size*section.track.gridSize, 0, 0)
-		@connections.C = new Connection(
+		@connections.B = new ConnectedTransform(@size*section.track.gridSize, 0, 0)
+		@connections.C = new ConnectedTransform(
 			Math.sin(@angle)*section.track.gridSize,
 			@flip*(1-Math.cos(@angle))*section.track.gridSize,
 			@flip*@angle*180/Math.PI)

	_firePieceAdded: (piece) ->
		idx = @_index piece
		transform = @_transform(idx.toString() + ":A")
		@_fire { type: 'add', target: piece, start: transform.compound(new Transform(0,0,180)) }		

	_sectionAndPieceIndex: (index) ->
		result = [-1,-1]


class Join extends Piece
	setSection: (section) ->
		@connections.B = new ConnectedTransform(@size*section.track.gridSize, 0, 0)
		@connections.C = new ConnectedTransform(
			((2/3)-Math.sin(@angle))*section.track.gridSize,
			@flip*(1-Math.cos(@angle))*section.track.gridSize,
			@flip*@angle*3*180/Math.PI)
