Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: unit flags/capabilities
Home

[Freeciv-Dev] Re: unit flags/capabilities

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Tony Stuckey <stuckey@xxxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: unit flags/capabilities
From: Andrew Sutton <ansutton@xxxxxxx>
Date: Thu, 29 Nov 2001 14:41:59 -0500

On Thursday 29 November 2001 02:39 pm, you wrote:
>       You could do that in a sickening way with bitwise math.
> F_UNIT_TRANSPORT_1,F_UNIT_TRANSPORT_2,F_UNIT_TRANSPORT_4,F_UNIT_TRANSPORT_8
>, etc, and have the get_transport_capacity() function sum them and return
> them.

eww... that is gross. i don't think we want to submit freeciv to the occc :) 
to be honest, if i really wanted to implement a "good" generic capability 
subcription design, i think i'd have to go with the use of function pointers. 
its quite powerful. it also lets you specialize behaviors for common 
capabilities.

implementing everything as a function definitely has its benefits. the big 
downfall is that its alot harder to configure using the ruleset 
specifications. it's also a little harder to get your head around. which is 
what i'm struggling to do right now.

andy


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