Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [Patch] is_city_center
Home

[Freeciv-Dev] Re: [Patch] is_city_center

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] is_city_center
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Mon, 1 Oct 2001 05:40:04 -0700 (PDT)

--- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, Oct 01, 2001 at 04:15:02AM -0700, Raahul Kumar wrote:
> > --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > > 
> > > The attached patch introduces a new method is_city_center. It also
> > > removes the local_ prefix of common/city methods.
> > > 
> > > check_pollution in server/cityturn.c may need some extra eye balls.
> > > 
> > >   Raimar
> > > 
> > > -- 
> > Check_pollution has this check
> > 
> > if ( ( x != -2 && x != 2 ) || ( y != -2 && y != 2 ) ) {
> > 
> > preventing pollution from being in the city radius. Yours seem to lack
> this.
> 
Sorry the above should read preventing pollution from being outside the city
radius.
> -2  . a a a .
> -1  b # # # b
>  0  b # C # b
> +1  b # # # b
> +2  . a a a .
> 
> ( x != -2 && x != 2 ) is the set union of # and a.
> 
> ( y != -2 && y != 2 ) is the set union of # and b.
> 
> ( x != -2 && x != 2 ) || ( y != -2 && y != 2 ) is the set union of #,
> a and b. This is the same as all without . This is the same
> is_valid_city_coords checks for.
> 
> 
> Correct? Wrong?
> 

After reading the code, you are correct. I was assuming you were excluding
squares instead of counting only squares that are in the radius. 



__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com


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