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: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] is_city_center
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 1 Oct 2001 13:55:23 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

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.

-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?
       
        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  The Software is not designed or licensed for use in on-line control
  equipment in hazardous environments, such as operation of nuclear
  facilities, aircraft navigation or control, or direct life support
  machines. 
    -- Java Compiler Compiler Download and License Agreement


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