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

Method roadTest

MicropolisCore/src/MicropolisEngine/src/traffic.cpp:491–504  ·  view source on GitHub ↗

* Can the given tile be used as road? * @param mv Value from the map. * @return Indication that you can drive on the given tile */

Source from the content-addressed store, hash-verified

489 * @return Indication that you can drive on the given tile
490 */
491bool Micropolis::roadTest(MapValue mv)
492{
493 MapTile tile = mv & LOMASK;
494
495 if (tile < ROADBASE || tile > LASTRAIL) {
496 return false;
497 }
498
499 if (tile >= POWERBASE && tile < LASTPOWER) {
500 return false;
501 }
502
503 return true;
504}
505
506
507////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected