Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yitonghe00/68448169954cfb8b690bb992f9c613c3 to your computer and use it in GitHub Desktop.
Save yitonghe00/68448169954cfb8b690bb992f9c613c3 to your computer and use it in GitHub Desktop.
// Add dependencies and exports
(require, exports, module) => {
const {buildGraph} = require("./graph");
const roads = [
"Alice's House-Bob's House", "Alice's House-Cabin",
"Alice's House-Post Office", "Bob's House-Town Hall",
"Daria's House-Ernie's House", "Daria's House-Town Hall",
"Ernie's House-Grete's House", "Grete's House-Farm",
"Grete's House-Shop", "Marketplace-Farm",
"Marketplace-Post Office", "Marketplace-Shop",
"Marketplace-Town Hall", "Shop-Town Hall"
];
exports.roadGraph = buildGraph(roads.map(road => road.split("-")));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment