path-info.js
// Concat another path onto this path
Concat another path onto this path
Concat another path onto this path
merge(path) {
		this.path.push.apply(this.path, path.path);
		let oldLength = this.length;
		this.length += path.length;
		this.roads.push.apply(this.roads, path.roads.map(function(road) {
			return oldLength + road;
		}));
		this.swamps.push.apply(this.swamps, path.swamps.map(function(swamp) {
			return oldLength + swamp;
		}));
	}
merge ( path ) { this . path . push . apply ( this . path , path . path ) ; let oldLength = this . length ; this . length += path . length ; this . roads . push . apply ( this . roads , path . roads . map ( function ( road ) { return oldLength + road ; } ) ) ; this . swamps . push . apply ( this . swamps , path . swamps . map ( function ( swamp ) { return oldLength + swamp ; } ) ) ; }
Concat another path onto this path
Concat another path onto this path