private fields for calculated values
This commit is contained in:
@@ -38,6 +38,7 @@ func (m *Matrix) String() string {
|
||||
return s
|
||||
}
|
||||
|
||||
// BalancePoints calculates the ecogood points for the matrix
|
||||
func (m *Matrix) BalancePoints() int {
|
||||
var balancePoints float64
|
||||
m.calcWeightFactor()
|
||||
@@ -105,13 +106,13 @@ func (m *Matrix) setMaxValuationPoints() {
|
||||
m.forall(func(t *Theme) {
|
||||
maxThemeValPoints := 0
|
||||
for _, a := range t.Aspects {
|
||||
a.MaxValuationPoints = m.MaxValuationPoints * int(a.Weight)
|
||||
a.maxValuationPoints = m.MaxValuationPoints * int(a.Weight)
|
||||
maxThemeValPoints += m.MaxValuationPoints * int(a.Weight)
|
||||
}
|
||||
t.Calc.MaxValuationPoints = maxThemeValPoints
|
||||
for _, na := range t.NegativeAspects {
|
||||
na.MaxValuationPoints = m.MaxNegValuationPoints
|
||||
na.maxValuationPoints = m.MaxNegValuationPoints
|
||||
}
|
||||
t.NegPointsFactor = m.NegPointsFactor
|
||||
t.negPointsFactor = m.NegPointsFactor
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user