hi quinn,

1) please don't ask 3 devs independently for review. that is very annoying as 
we all got better things to do than to do the work others might have done 
before!
2) in the screenshot attached you can see 2 globs bringing unneeded stone so i 
guess you're not yet finished.

>//calculate the suitability value for this unit
>int value = 0
>       //attributes:                   weights:
>       //===========                   ========
>       + urgency                               * 100
>       + timeLeft                              * 1
>       + distBuilding                  * -1
>       + closestResourceDist   * -2
>       + unit->level[SWIM]             * -10
>       + unit->level[WALK]             * -20
>       + unit->level[HARVEST]  * -15
>       + unit->hp                              * 10
as i don't like magic numbers (slap me if i produce any more of those. i know i 
did before) i'd prefere to have it more like
>//calculate the suitability value for this unit
>int value = 0
>       //attributes:                   weights:
>       //===========                   ========
>       /// describes (i have no idea)
>       int urgencyWeight=100;
>       /// describes the weight of having much walk distance left before 
> needing an inn.
>       int timeLeftWeight
>       ...
>int value = 0
>       //attributes:                   weights:
>       //===========                   ========
>       + urgency               *urgencyWeight
>       + timeLeft              *timeLeftWeight
>       + distBuilding          *distBuildingWeight
>       + closestResourceDist   *closestResourceDistWeight
>       + unit->level[SWIM]     *swimWeight
>       + unit->level[WALK]     *walkWeight
>       + unit->level[HARVEST]  *harvestWeight
>       + unit->hp              *hpWeight


greetings,

leo


_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to