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

Method testBounds

MicropolisCore/src/MicropolisEngine/src/position.h:163–167  ·  view source on GitHub ↗

* Test whether the position is on-map. * @return Position is on-map. */

Source from the content-addressed store, hash-verified

161 * @return Position is on-map.
162 */
163inline bool Position::testBounds()
164{
165 return (this->posX >= 0 && this->posX < WORLD_W
166 && this->posY >= 0 && this->posY < WORLD_H);
167}
168
169/**
170 * Less-than comparison on positions (needed for map since Position is used as

Callers 5

treeSplashMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected