Exemple #1
0
 public void CreateFields()
 {
     Company.Create();
     Chance.Create();
     TaxeField.Create();
     //Field.Create(); ???????????????????????
 }
Exemple #2
0
 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();
         }
     }
 }
Exemple #3
0
 public void PayTaxes(TaxeField taxeField)
 {
     this.Minus(taxeField.AmountOfTax);
 }