Make connections in LabyrinthServer two-way

This commit is contained in:
Manuel Thalmann 2022-11-16 21:57:47 +01:00
parent 11983e0f08
commit 13991b6bd2

View file

@ -26,7 +26,10 @@ public class LabyrinthServer implements CommandExecutor {
while ((currentLine = reader.readLine()) != null) {
String[] elements = currentLine.split(" ");
graph.addEdge(elements[0], elements[1], 0);
for (int i = 0; i <= 1; i++) {
graph.addEdge(elements[i], elements[1 - i], 0);
}
}
}
} catch (Throwable e) {