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: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 31 Aug 2003 13:04:47 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[glip - Thu Aug 28 23:06:09 2003]:

> [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.

Greg, can you look at this again?  It patch looks correct to me.

>  Also, the first call to make_island needs a correction to the
> weight I think.

You mean the current code is buggy?

jason



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