MCPcopy Create free account
hub / github.com/SimHacker/micropolis / getChar

Method getChar

micropolis-java/src/micropolisj/engine/Sprite.java:49–58  ·  view source on GitHub ↗
(int x, int y)

Source from the content-addressed store, hash-verified

47 }
48
49 protected final int getChar(int x, int y)
50 {
51 int xpos = x / 16;
52 int ypos = y / 16;
53 if (city.testBounds(xpos, ypos)) {
54 return city.getTile(xpos, ypos);
55 } else {
56 return -1;
57 }
58 }
59
60 /**
61 * For subclasses to override. Actually does the movement and animation

Callers 2

moveImplMethod · 0.45
moveImplMethod · 0.45

Calls 2

getTileMethod · 0.65
testBoundsMethod · 0.45

Tested by

no test coverage detected