MCPcopy Create free account
hub / github.com/Neop/mudmap2 / getExit

Method getExit

src/main/java/mudmap2/backend/Path.java:92–96  ·  view source on GitHub ↗

Gets the exit direction of a place p used in this path @param p @return the exit direction of p in the path @throws RuntimeException if the place isn't a member of the path

(Place p)

Source from the content-addressed store, hash-verified

90 * @throws RuntimeException if the place isn't a member of the path
91 */
92 public String getExit(Place p) throws RuntimeException{
93 if(places[0] == p) return exitdirections[0];
94 else if(places[1] == p) return exitdirections[1];
95 else throw new RuntimeException("Place not found in path");
96 }
97
98 /**
99 * Gets the place that is not equal to p in a path

Callers 8

testGetExitMethod · 0.95
ContextMenuMethod · 0.45
paintMethod · 0.45
createMethod · 0.45
createMethod · 0.45
createMethod · 0.45
breadthSearchMethod · 0.45

Calls

no outgoing calls

Tested by 1

testGetExitMethod · 0.76