fix: production with free P.I.
This commit is contained in:
@@ -27,23 +27,23 @@ func TestProduceIndustry(t *testing.T) {
|
||||
Population: 500,
|
||||
Industry: 500,
|
||||
}
|
||||
HW.ProduceIndustry()
|
||||
HW.ProduceIndustry(HW.ProductionCapacity())
|
||||
assert.InDelta(t, 196.078, HW.Capital.F(), 0.0005)
|
||||
|
||||
HW.Capital = 0
|
||||
HW.Material = 200
|
||||
|
||||
HW.ProduceIndustry()
|
||||
HW.ProduceIndustry(HW.ProductionCapacity())
|
||||
assert.Equal(t, 200., HW.Capital.F())
|
||||
assert.Equal(t, 0., HW.Material.F())
|
||||
|
||||
DW.ProduceIndustry()
|
||||
DW.ProduceIndustry(DW.ProductionCapacity())
|
||||
assert.InDelta(t, 98.039, DW.Capital.F(), 0.0003)
|
||||
|
||||
DW.Capital = 0
|
||||
DW.Material = 100
|
||||
|
||||
DW.ProduceIndustry()
|
||||
DW.ProduceIndustry(DW.ProductionCapacity())
|
||||
assert.Equal(t, 100., DW.Capital.F())
|
||||
assert.Equal(t, 0., DW.Material.F())
|
||||
}
|
||||
@@ -57,16 +57,16 @@ func TestProduceMaterial(t *testing.T) {
|
||||
}
|
||||
assert.Equal(t, 0., HW.Material.F())
|
||||
|
||||
HW.ProduceMaterial()
|
||||
HW.ProduceMaterial(HW.ProductionCapacity())
|
||||
assert.Equal(t, 10000., HW.Material.F())
|
||||
|
||||
HW.Industry = 500
|
||||
HW.Population = 500
|
||||
HW.ProduceMaterial()
|
||||
HW.ProduceMaterial(HW.ProductionCapacity())
|
||||
assert.Equal(t, 15000., HW.Material.F())
|
||||
|
||||
HW.Population = 1000
|
||||
HW.ProduceMaterial()
|
||||
HW.ProduceMaterial(HW.ProductionCapacity())
|
||||
assert.Equal(t, 21250., HW.Material.F())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user