]> git.pond.sub.org Git - empserver/commitdiff
Change fairland island size probability distribution
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 9 Mar 2009 20:22:03 +0000 (21:22 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 26 Jan 2010 21:49:51 +0000 (22:49 +0100)
Island size is randomly chosen from the interval [1..2*is+1], with
expected value is.  Use two dice to roll the size instead of one.
This makes extreme sizes much less likely.

src/util/fairland.c

index 8f5f454b81a032c9c0686bc14adab208ed00fe1f..2551836601f33d71d06ba152b4f387a16b688876 100644 (file)
@@ -821,7 +821,7 @@ grow_islands(void)
        secs = 0;
        if (!place_island(c, &x, &y))
            return;
-       isiz = 1 + rnd(2 * is - 1);
+       isiz = 1 + rnd(is) + rnd(is);
        do {
            ++secs;
            find_coast(c);