14 lines
256 B
Go
14 lines
256 B
Go
package calc
|
|
|
|
func ShipProductionCost(shipEmptyMass float64) float64 {
|
|
return shipEmptyMass * 10.
|
|
}
|
|
|
|
func PlanetProduceShipMass(L, Mat, Res float64) float64 {
|
|
result := L / 10
|
|
if result <= Mat {
|
|
return result
|
|
}
|
|
return (L + Mat/Res) / (10 + 1/Res)
|
|
}
|