X-Git-Url: http://git.pond.sub.org/?p=empserver;a=blobdiff_plain;f=src%2Futil%2Ffairland.c;h=22676d9c36ff6a347ec2d02e7467dff10c58772d;hp=9f28769c1891fd0cb063fee72d56384bdb3f5f10;hb=ca110e55ed948ac1783bf6e8ba33aae6fa6080db;hpb=18687315acd19aa43d3da65a48da2a2fcd0e7536 diff --git a/src/util/fairland.c b/src/util/fairland.c index 9f28769c1..22676d9c3 100644 --- a/src/util/fairland.c +++ b/src/util/fairland.c @@ -67,8 +67,10 @@ * in one such sphere, and each sphere contains the same number of * islands. * - * Place and grow islands in spheres in turn. Place the first sector - * randomly, pick an island size, then grow the island to that size. + * Pick an island size, then place and grow one island of that size in + * each sphere. Place the first sector randomly, then grow the island + * to the intended size. Repeat until the specified number of islands + * has been grown. * * If placement fails due to lack of room, start over, just like for * continents. @@ -1121,13 +1123,15 @@ grow_islands(void) for (c = nc; c < nc + ni; ++c) { isecs[c] = 0; + if (c % nc == 0) + isiz = roll(is) + roll0(is); + assert(isiz > 0); if (!place_island(c)) { qprint("\nNo room for island #%d", c - nc + 1); break; } - isiz = roll(is) + roll0(is); for (secs = 1; secs < isiz; secs++) { if (!grow_one_sector(c)) { stunted_islands++;