public static bool isBalanced() { Balancing balancing = new Balancing(Galaxy.Instance); foreach (StarSystem spawnStar in Galaxy.Instance.SpawnStars) { balancing.playerScore(spawnStar); } return true; }
public static bool isBalanced() { Balancing balancing = new Balancing(Galaxy.Instance); List<BalancingPlayer> players = balancing.balancingGalaxy.playerScores(); foreach (BalancingPlayer player in players) { System.Diagnostics.Trace.WriteLine(player); } double standardDev = CalculateStdDev(players.Select(player => player.score)); return standardDev < MAX_DEVIATION; }