Created
December 23, 2015 18:30
-
-
Save danared/c6f0533a1f05f678d203 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Path(){ | |
this.distance = 0; | |
this.visited = []; | |
this.clone = function() { | |
var newPath = new Path(); | |
newPath.distance = this.distance; | |
for ( i in this.visited ) | |
newPath.visited.push ( this.visited[i] ); | |
return newPath; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment