Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: Map coordinate cleanups.
Home

[Freeciv-Dev] Re: Map coordinate cleanups.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Map coordinate cleanups.
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 19 Aug 2001 16:51:59 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Aug 19, 2001 at 02:27:42PM +0100, Gregory Berkolaiko wrote:
>  --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: 
> > normalized positions? For the remaining 5% I don't care if the code
> > is:
> > 
> >    x1=x+dx;
> >    y1=y+dy;
> >    if(!is_real_position(x1,y1))
> >       continue;
> >    normalize_position(&x1,&y1);
> >    return (x1 and y1);
> > 
> > or
> > 
> >    x1=x+dx;
> >    y1=y+dy;
> >    normalize_position(&x1,&y1);
> >    if(!is_real_position(x1,y1))
> >       continue;
> >    return (x1 and y1);
> > 
> > The first one looks better from a performance point of view.
> 
> Actually I vote for
> 
>     x1=x+dx;
>     y1=y+dy;
>     if(!normalize_position(x1,y1))
>        continue;
>     return (x1 and y1);
> 
> since normalize returns a very useful value.

IMHO the first solution is the cleanest. However as I said, _I_ don't
care about the 5% which uses such methods.

> Anyway, Raimar, what is this thing "AI client" that Ross mentioned
> you were writing?

I have mail.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx


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