[Freeciv-Dev] Re: [Patch] is_city_center
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- 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
|
|