Created
May 3, 2022 05:33
-
-
Save yitonghe00/68448169954cfb8b690bb992f9c613c3 to your computer and use it in GitHub Desktop.
This file contains 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
// 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