]> git.pond.sub.org Git - empserver/commit - tests/fairland/plain.xdump
fairland: Grow islands interleaved
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 11 Aug 2020 14:16:30 +0000 (16:16 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 19 Jan 2021 07:27:34 +0000 (08:27 +0100)
commit8d0c196c8bcbe2e17100cd63df29a8007b0f92c5
treed16cbb79bc45f35e868b01d044e1cb9ca10c6262
parentae988c00baa43f6c0c58f5531274d7c7c7ddc85f
fairland: Grow islands interleaved

The previous commits changed grow_island() to create islands in
batches consisting of one island per continent, all of the same
planned size.  grow_island() still places and grows one island after
the other.  When an island can't grow to the actual size, the others
in the same batch are not affected.  Island size can therefore differ
a lot within the same batch.

Change grow_island() to interleave the work on a batch's island: first
place them all, then add one sector to each in turn.  Stop after all
reached the planned size, or one or more could not be grown further.

This is similar to how we grow continents: drift() places them all,
and grow_continent() adds one sector to each continent in turn.

Island size within the same batch can now differ at most by one
sector.  The next commit will eliminate that remaining difference.

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