Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2002:
[freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14
Home

[freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: Freeciv AI development <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Sat, 14 Sep 2002 20:10:55 +0200

On Sat, Sep 14, 2002 at 06:29:22PM +0100, Gregory Berkolaiko wrote:
> On Sat, 14 Sep 2002, Raimar Falke wrote:
> > You get full control over the cost (get_BMC, get_ECOT) and the
> > termination condition (get_TB). You may want additionally to do the
> > moves_left and turn calculation by yourself. If the *_data stuff and
> > the comments are removed:
> > 
> > struct pf_parameter {
> >   int start_x, start_y;
> > 
> >   /* 
> >    * pointer to turn, pointer to moves_left, x, y, data
> >    */
> >   void (*update_turn_and_moves_left) (int *, int *, int, int);
> > 
> >   enum tile_behavior (*get_TB) (int, int, void *);
> > 
> >   int (*get_ECOT) (int, int, void *);
> > 
> >   bool(*is_position_dangerous) (int, int, void *);
> > 
> >   int (*get_COP) (int, int, int, int, void *);
> > };
> 
> This looks nice :)

> Would be even nicer with out COP.

Without COP or without get_COP?

> BTW, how about passing pointer to parameter instead of void * to all
> functions?  I know it reduces flexibility but not that much, does
> it?

And how does these function know about what unit you speak?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "There are three ways to get something done. Do it yourself, hire someone
  to do it for you or forbid your kids to do it."


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