Example #1
0
    public float GetResourceAffilatedSum(CardType type, List <int> values)
    {
        int          amountNeed = TaskRawDataParser.GetNeed(_taskObject, type);
        List <float> coeffs     = TaskRawDataParser.GetCoefficients(_taskObject, type);
        float        resource   = 0f;

        if (amountNeed != 0 && values.Count != 0 &&
            coeffs.Count == 0 && values.Count == coeffs.Count)
        {
            resource = values.Sum() >= amountNeed?
                       TaskRawDataParser.AffilateResources(values, coeffs) :
                           TaskRawDataParser.AffilateResourcesByDesc(values, coeffs, amountNeed);
        }
        return(resource);
    }
Example #2
0
 public Dictionary <CardType, int> GetNeed()
 {
     return(TaskRawDataParser.GetNeed(_taskObject));
 }
Example #3
0
 public int GetNeed(CardType type)
 {
     return(TaskRawDataParser.GetNeed(_taskObject, type));
 }