Implement BuCol
This commit is contained in:
		@@ -40,25 +40,25 @@ public class GameEngine
 | 
			
		||||
    public static int PlanetPopGrowthForPlayer(int currentPop, int value) 
 | 
			
		||||
    {
 | 
			
		||||
        int maxPop = MaxPopOnPlanetForPlayer(value);
 | 
			
		||||
        int growth;
 | 
			
		||||
        double growth;
 | 
			
		||||
 | 
			
		||||
        if (value < 0)
 | 
			
		||||
        {
 | 
			
		||||
            growth = currentPop * value / 10;
 | 
			
		||||
            growth = currentPop * value / 1000;
 | 
			
		||||
        } 
 | 
			
		||||
        else 
 | 
			
		||||
        {
 | 
			
		||||
            double popRatio = currentPop / maxPop;
 | 
			
		||||
            double popRatio = (double) currentPop / maxPop;
 | 
			
		||||
            if (popRatio <= 0.25)
 | 
			
		||||
                growth = currentPop * value * Game.Player.GrowthRatePercent / 100;
 | 
			
		||||
                growth = currentPop * value / 100.0 * Game.Player.GrowthRatePercent / 100.0;
 | 
			
		||||
            else if (popRatio <= 1)
 | 
			
		||||
                growth = currentPop * value * Game.Player.GrowthRatePercent /100 * 16 / 9 * ((int) Math.Pow(1 - popRatio, 2));
 | 
			
		||||
                growth = currentPop * value / 100.0 * Game.Player.GrowthRatePercent / 100.0 * 16.0 / 9.0 * Math.Pow(1.0 - popRatio, 2);
 | 
			
		||||
            else
 | 
			
		||||
                 growth = (int) (currentPop * (popRatio - 1) * 0.04);
 | 
			
		||||
                growth = currentPop * (popRatio - 1) * 0.04;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // round to nearest 100
 | 
			
		||||
        return growth / 100 * 100;
 | 
			
		||||
        return ((int) growth) / 100 * 100;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user