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



Playfield::getPathsThrough = (x, y) ->
	cell = @pathPlane[y][x]
	keys = Object.keys cell
	paths = []
	keys.forEach (key) -> paths.push cell[key]
	paths


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

	return


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