 
 Playfield::addPath = (path) ->
 	path.list.forEach (entry) ->
-		@pathPlane[entry.y][entry.x][path.id] = path
+		cell = @pathPlane[entry.y][entry.x]
+		cell.set path.id, path
 		return
 	, @
 	@

Playfield::clearPaths = ->
	for i in [0...@height]
		for j in [0...@width]
			@pathPlane[i][j] = {}

	return




Playfield::getPathsThrough = (x, y) ->
	Array.from @pathPlane[y][x].values()


Playfield::removePath = (path) ->
	path.list.forEach (entry) =>
		cell = @pathPlane[entry.y][entry.x]
		cell.delete path.id
		return

	return
