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

Method makeSingleLake

MicropolisCore/src/MicropolisEngine/src/generate.cpp:273–288  ·  view source on GitHub ↗

* Make a random lake at \a pos. * @param pos Rough position of the lake. */

Source from the content-addressed store, hash-verified

271 * @param pos Rough position of the lake.
272 */
273void Micropolis::makeSingleLake(const Position &pos)
274{
275 int numPlops = getRandom(12) + 2;
276
277 while (numPlops > 0) {
278 Position plopPos(pos, getRandom(12) - 6, getRandom(12) - 6);
279
280 if (getRandom(4)) {
281 plopSRiver(plopPos);
282 } else {
283 plopBRiver(plopPos);
284 }
285
286 numPlops--;
287 }
288}
289
290
291/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected