 # a track is an observable / drawable model of a woooden train track comprising
 # multiple pieces of different types connected together
-# TODO: make observable
+# see http://www.nczonline.net/blog/2010/03/09/custom-events-in-javascript/ for observable
 class Track
 	constructor: (options={}) ->
 		@gridSize = options.gridSize ? 100

		@trackGap = options.trackGap ? 1
		@gapTransform = new Transform(@trackGap, 0, 0)
		@sections = []

	draw: (painter) ->
		@sections.forEach (section) ->

				else
					@createSection()
		piece.setSection section
		fire { type: 'pieceadded', target: piece }

	# Connect piece to available connection identified from code, e.g. "10:C".
	# Throws Error if specified connection not available.
