//<-- public bool Equals(EnercitiesGameInfo other) { return Level == other.Level && Population == other.Population && Money.Equals(other.Money) && MoneyEarning.Equals(other.MoneyEarning) && Oil.Equals(other.Oil) && PowerConsumption.Equals(other.PowerConsumption) && PowerProduction.Equals(other.PowerProduction) && EnvironmentScore.Equals(other.EnvironmentScore) && EconomyScore.Equals(other.EconomyScore) && WellbeingScore.Equals(other.WellbeingScore) && GlobalScore.Equals(other.GlobalScore) && CurrentRole == other.CurrentRole; }
public static EnercitiesGameInfo DeserializeFromJson(string serialized) { try { var textReader = new StringReader(serialized); var serializer = new JsonSerializer(); _lastDeserializedState = (EnercitiesGameInfo) serializer.Deserialize(textReader, typeof (EnercitiesGameInfo)); } catch (Exception e) { Console.WriteLine("Failed to deserialize EnercitiesGameInfo from '" + serialized + "': " + e.Message); } return _lastDeserializedState; }