Complete.Org: Mailing Lists: Archives: freeciv-ai: January 2003:
[freeciv-ai] Re: Goto coordinates and ai roles
Home

[freeciv-ai] Re: Goto coordinates and ai roles

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Ross Wetmore <rwetmore@xxxxxxxxxxxx>
Cc: Freeciv AI development <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: Goto coordinates and ai roles
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Tue, 28 Jan 2003 15:22:25 +0000 (GMT)

On Mon, 27 Jan 2003, Ross Wetmore wrote:

> I think if you go back and reread the entire thread your option was covered
> and bypassed in favour of a pointer early on. But it was the first of the
> two options suggested.

I read the whole thread (or at least the portion of it that was in my 
mailbox) and I still remember that you proposed the bool and this 
proposition was subsequently ignored.  My email was a humble call to 
reevaluate your earlier proposal ;)

> Note a correction to your analysis, the pointer is not to punit, but into
> it at (struct map_position) punit->goto_dest, which should make you happy
> because it is lower down the struct punit body, and make the rest happy
> because it doesn't have any backwards compatibility or maintenance issues
> associated with it.

Actually, the point of my analysis was not _where_ the pointer points, but 
how many values it can take.  But also, from your email,

> >>Instead, add the pointer to the punit struct, and point it back at the

and I think pointer to punit struct is
  struct unit *pointer;

> I would hope that where the goto_dest memory lies should be a relatively
> *un*imaginative concept, i.e. pointers can reference arbitrary memory.
> If not, consider this a revelation of sorts about "C" pointers :-).

:)

Of course one can consider memory as completely grey and anisotropic 
medium.  But when you think one level less abstract, memory is filled with 
things, and they are different, and this is when imagination kicks in :)

Anyway, unless there are plans to point that pointer to somewhere else in 
the future, bool is both enough to make it work and easier to understand.

Best wishes,
G.



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