glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] questions about code


From: Quinn Yee Qin Teh
Subject: Re: [glob2-devel] questions about code
Date: Sun, 19 Oct 2008 00:54:49 +1100

Hi guys,
 
Another question regarding Building.cpp for 0.9.3, this time about the following function:
 
int Building::neededRessource(int r)
{
    assert(r >= 0);
    int need = type->maxRessource[r] - ressources[r] + 1 - type->multiplierRessource[r];
    if (need > 0)
        return need;
    else
        return 0;
}

 
1. What is type->multiplierRessource and why is the value of need calculated like that?
 
2. If I simply want the exact number of resource r that the building can still hold, will it be accurate for me to just use the _expression_ "type->maxRessource[r] - ressources[r]"?
 
Thanks a lot.
Quinn

 
On Wed, Oct 15, 2008 at 4:57 PM, Quinn Yee Qin Teh <address@hidden> wrote:
Great! Thanks.


 
On Wed, Oct 15, 2008 at 4:40 AM, Bradley Arsenault <address@hidden> wrote:


On Sat, Oct 11, 2008 at 3:14 PM, Quinn Yee Qin Teh <address@hidden> wrote:
Another question, does subscribeToBringRessourcesStep() cover building construction sites?
 
Thanks

Yes it does. It covers anything that needs to have ressources brought to it.



--
Extra cheese comes at a cost. Bradley Arsenault.

_______________________________________________
glob2-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/glob2-devel




reply via email to

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