Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] (PR#5431) Unecessary Global Variable in mapgen.c
Home

[Freeciv-Dev] (PR#5431) Unecessary Global Variable in mapgen.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: cameron@xxxxxxxxxx
Subject: [Freeciv-Dev] (PR#5431) Unecessary Global Variable in mapgen.c
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Thu, 28 Aug 2003 16:06:09 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[cameron - Thu Aug 28 17:08:58 2003]:

> [glip - Thu Aug 28 13:08:55 2003]:
>  
> > The code is produced by good intentions, if you look down to see how 
> > totalweight is used.  But I agree it should be removed.  The same, 
> > however, should be done to the similar code in mapgenerator4, in the 
> > same patch!
> 
> This patch doesn't use static variables, and fixes the incredibly ugly
> code in gen4. This single line will do exactly the same thing as what
> was there before, and is vastly more transparent to what it's doing.
> 
> I am fairly certain my arithmetic is correct.

I am fairly cerain it isn't.

totalweight = (30 + bigweight) * game.nplayers;
totalweight += (game.nplayers == 1 ? 2 * bigweight : 0);

would be more correct I think.  It's quite ridiculous but so it is
written.  Also, the first call to make_island needs a correction to the
weight I think.

I also notice that you did not change the spacing in
+  } else if(checkmass>map.xsize+map.ysize) {

If you don't want to do it, please say why.

Not being careful about answering all the comments does not speed up the
inclusion of a patch.  It just annoys reviewers ;)

G.


[Prev in Thread] Current Thread [Next in Thread]