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

Method getPathColor

src/main/java/mudmap2/backend/World.java:315–329  ·  view source on GitHub ↗

Gets the color of an exit direction @param dir exit direction @return path color

(String dir)

Source from the content-addressed store, hash-verified

313 * @return path color
314 */
315 public Color getPathColor(String dir){
316 Color ret;
317
318 if(dir == null){
319 ret = getPathColorStd();
320 } else if(!pathColors.containsKey(dir)){
321 if(dir.equals("n") || dir.equals("s") || dir.equals("e") || dir.equals("q") ||
322 dir.equals("ne") || dir.equals("nw") || dir.equals("se") || dir.equals("sw") ||
323 dir.equals("w") || dir.equals("e"))
324 ret = pathColorCardinal;
325 else ret = pathColorNonCardinal;
326 } else ret = pathColors.get(dir);
327
328 return ret;
329 }
330
331 /**
332 * Gets exit direction colors (without default colors)

Callers 3

testGetPathColorMethod · 0.95
testSetPathColorMethod · 0.95
paintMethod · 0.80

Calls 2

getPathColorStdMethod · 0.95
getMethod · 0.65

Tested by 2

testGetPathColorMethod · 0.76
testSetPathColorMethod · 0.76