Make connections in LabyrinthServer two-way
This commit is contained in:
parent
11983e0f08
commit
13991b6bd2
1 changed files with 4 additions and 1 deletions
|
@ -26,7 +26,10 @@ public class LabyrinthServer implements CommandExecutor {
|
||||||
|
|
||||||
while ((currentLine = reader.readLine()) != null) {
|
while ((currentLine = reader.readLine()) != null) {
|
||||||
String[] elements = currentLine.split(" ");
|
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) {
|
} catch (Throwable e) {
|
||||||
|
|
Loading…
Reference in a new issue