Skip to content

Instantly share code, notes, and snippets.

@hoorayimhelping
Created September 9, 2015 02:36
Show Gist options
  • Save hoorayimhelping/1739201fc1fa4e105bda to your computer and use it in GitHub Desktop.
Save hoorayimhelping/1739201fc1fa4e105bda to your computer and use it in GitHub Desktop.
diff --git a/js/src/graph.js b/js/src/graph.js
index 00ab25c..e4a61d5 100644
--- a/js/src/graph.js
+++ b/js/src/graph.js
@@ -21,6 +21,10 @@ Graph.prototype = {
return this.edges.some(function(edge) {
return edge.areAdjacent(node1, node2);
});
+ },
+
+ traverse: function(node1, node2) {
+
}
// delete(G, x, y): removes the edge from x to y, if it is there.
diff --git a/js/test/graph.js b/js/test/graph.js
index 9bac524..5033da6 100644
--- a/js/test/graph.js
+++ b/js/test/graph.js
@@ -15,6 +15,8 @@ var newEdge = function(options) {
};
test("creating a simple delta-v graph of the delta-v graph around kerbin", function(t) {
+ t.plan(5);
+
// http://i.imgur.com/duY2S.png
var graph = new Graph();
@@ -27,8 +29,6 @@ test("creating a simple delta-v graph of the delta-v graph around kerbin", funct
var lko_gto = newEdge({ deltav: 670, name: 'lko-gto' });
var lko_mun_transfer = newEdge({ deltav: 190, name: 'lko-mun_transfer' });
- t.plan(5);
-
graph.addNode(kerbin);
graph.addNode(low_kerbin_orbit);
graph.addNode(geostationary_transfer_orbit);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment