[Freeciv-Dev] Re: (PR#2370) Path finding
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Feb 17, 2003 at 09:01:04AM -0800, Gregory Berkolaiko wrote:
>
> On Mon, 17 Feb 2003, Raimar Falke wrote:
>
> > On Mon, Feb 17, 2003 at 04:59:19AM -0800, Gregory Berkolaiko wrote:
> > >
> > > I remembered something that is really essential and that we forgot to put
> > > it:
> > >
> > > pf_get_position(map, pos, x, y)
> > >
> > > This way we can query the map which is already made.
> >
> > Do you mean
> >
> > pf_path tmp;
> >
> > pf_get_path(map, x, y, &tmp);
> > foobar = pf_last_position(&path);
> Precisely, but without wasting time on lifting the whole path off
> the map.
*searching* yes there it is:
"Premature optimization is the root of all evil."
-- D. E. Knuth in "Structured Programming with go to Statements"
If you know the destination I don't think you are interrested in the
cost only (which would be a reason for use of pf_get_position). I
think you will be interrested in the path since you want to go to this
position.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"I heard if you play the NT-4.0-CD backwards, you get a satanic message."
"That's nothing, if you play it forward, it installs NT-4.0"
[Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/16
[Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/17
[Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/17
- Message not available
- [Freeciv-Dev] Re: (PR#2370) Path finding,
Raimar Falke <=
[Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/18
[Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/18
[Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/19
|
|