public void CreateFields() { Company.Create(); Chance.Create(); TaxeField.Create(); //Field.Create(); ??????????????????????? }
public static void Create() { using (StreamReader sr = new StreamReader("D:/С#/Monopoly/TaxeFields.txt")) { string s = sr.ReadLine(); while (s != null) { TaxeField taxeField = JsonSerializer.Deserialize <TaxeField>(s); Game.fields[taxeField.Position] = taxeField; s = sr.ReadLine(); } } }
public void PayTaxes(TaxeField taxeField) { this.Minus(taxeField.AmountOfTax); }