Complete.Org: Mailing Lists: Archives: freeciv-ai: November 2002:
[freeciv-ai] Re: patch/rfc: goto and move/attack test wrapping
Home

[freeciv-ai] Re: patch/rfc: goto and move/attack test wrapping

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: "Per I. Mathisen" <per@xxxxxxxxxxx>, freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: patch/rfc: goto and move/attack test wrapping
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Sat, 23 Nov 2002 11:04:32 -0500

The return status hiding is *very* bad and not really needed as most of
the code changes here are cleaner and more understanable without it.

Cheers,
RossW
=====

At 12:25 AM 02/11/23 +0000, Per I. Mathisen wrote:
>
>On Mon, 18 Nov 2002, Per I. Mathisen wrote:
>> Taken from massive ai. Unless I get disagreeing comments, I will commit
>> these wrappers and the associated changes in the rest of the code.
>>
>> This is an important API decision so please consider it carefully.
>>
>> gothere is used for goto over several turns and goto with ferries, and is
>> the one which should eventually be expanded into a replacement for
>> military and settler gothere with associated ferrying capability. Before
>> calling it, always set goto destination explicitly.
>>
>> goto is for one-turn gotos, for example run off and attack a target of
>> opportunity. It will _retain_ existing goto destination and role, ie it is
>> non-destructive for existing missions.
>>
>> can_move is a wrapper which enables you to test for movement _without
>> going ACTIVITY_IDLE first_. This way, if you decide not to move after all,
>> your fortify status remains unchanged.
>>
>> can_attack is the same for attack tests.
>>
>> (The two latter are necessary but not sufficient to avoid the AI's
>> always-break fortification syndrome.)
>
>Attached is a full patch. Please read. Will commit it in a week or so
>(when I get some time again), unless someone beat me to it ... *wink*
>
>  - Per
>
>Attachment Converted: "c:\program files\eudora\attach\wrapgoto1.diff"
>



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