Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] (PR#7345) auto_arrange_workers callers need to be redesign
Home

[Freeciv-Dev] (PR#7345) auto_arrange_workers callers need to be redesign

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#7345) auto_arrange_workers callers need to be redesigned
From: "James Canete" <use_less@xxxxxxxxxxx>
Date: Sat, 31 Jan 2004 00:10:35 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7345 >

We could always change update_city_tile_status() to also return true if
a worker has been displaced, and remove the call to
auto_arrange_workers() within.

This would involve adding an if to almost every call to
update_city_tile_status() and update_city_tile_status_map(), executing
an auto_arrange_workers() if true.  Perhaps a wrapper function for
automatically calling auto_arrange_workers() would decrease the
redundant ifs.

One good point is that depending on the context of the call, the
auto_arrange_workers() call can be deferred to later, if we're simply
updating all the tiles in a city for example.

One problem with this is it adds a lot of calls to
auto_arrange_workers(), since update_city_tile_status() also returns a
true if a tile becomes available.  I have no idea if this is good
behavior or not. :)

-James Canete


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