It occurs to me (belatedly) that you could use this code to generate maps similar to those in FreeCiv, perhaps for a game in the same vein. How complex is the code?