Complete.Org: Mailing Lists: Archives: freeciv-ai: April 2003:
[freeciv-ai] Re: pre-patch to new settler code
Home

[freeciv-ai] Re: pre-patch to new settler code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: pre-patch to new settler code
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Wed, 30 Apr 2003 21:52:48 +0200

On Tue, Apr 29, 2003 at 05:09:50PM +0000, Per I. Mathisen wrote:
> On Tue, 29 Apr 2003, Gregory Berkolaiko wrote:
> > > - Add two functions to create and destroy virtual cities.
> >
> > Left out
> 
> As agreed with Greg earlier, this was moved into common code for the
> benefit of those who want to write client-side AIs.
> 
> I think we should also move (and integrate) the similar functions for
> creating and destroying virtual units into common code.

While in general it is easier to use "virtual objects" (structs which
are filled out but not part of the global web of objects) because
almost all functions take objects I think that it is cleaner to pass
all required values explicit. This is especially try to code parts
which must support a dry-mode like path-finding or settler management
(because some other code has to decide if another settler will find
good work). I think we did a good job at this in the (core)
path-finding interface. It also shows that for convenience it is good
to support an (outer) interface which takes "normal" objects as
parameters.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Make it idiot-proof and someone will make a better idiot."



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