]> git.pond.sub.org Git - empserver/commit
fairland: Fail when island can't be placed, for fairness
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 11 Aug 2020 14:16:30 +0000 (16:16 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 5 Jan 2021 09:41:36 +0000 (10:41 +0100)
commit18687315acd19aa43d3da65a48da2a2fcd0e7536
tree78ce6a376c581e852188af0a804dee1f07ee2404
parent74bc8adb636f9c3e5872c0eed92c8e3595d0e46e
fairland: Fail when island can't be placed, for fairness

The previous commit made island distribution more fair by placing
islands close to a continent in turn.  This is still unfair when
fairland can't place all the islands.

Make grow_islands() fail when it can't place all islands, and main()
start over then, just like it does when grow_continents() fails.

Deities can no longer fill the world with islands by asking for a
impossibly high number of islands.  Tolerable loss, I think.

fairland-test needs a tweak to avoid loss of test coverage.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/util/fairland.c
tests/fairland-test
tests/fairland/stunted-newcap_script
tests/fairland/stunted.out
tests/fairland/stunted.xdump