Ejemplo n.º 1
0
 public void AddProductionForVillage(Village village,
     Production production)
 {
     if (production4Village.ContainsKey(village))
     {
         production4Village.Remove(village);
     }
     production4Village.Add(village, production);
 }
Ejemplo n.º 2
0
 private Production GetProduction()
 {
     TableCell cellWood = browser.TableCell(Find.ById("l4"));
     TableCell cellClay = browser.TableCell(Find.ById("l3"));
     TableCell cellIron = browser.TableCell(Find.ById("l2"));
     TableCell cellCrop = browser.TableCell(Find.ById("l1"));
     const char separator = '/';
     Production production = new Production
                             {
                                 WoodPerHour = Int32.Parse(cellWood.Title),
                                 Wood = Int32.Parse(cellWood.Text.Split(separator)[0]),
                                 ClayPerHour = Int32.Parse(cellClay.Title),
                                 Clay = Int32.Parse(cellClay.Text.Split(separator)[0]),
                                 IronPerHour = Int32.Parse(cellIron.Title),
                                 Iron = Int32.Parse(cellIron.Text.Split(separator)[0]),
                                 CropPerHour = Int32.Parse(cellCrop.Title),
                                 Crop = Int32.Parse(cellCrop.Text.Split(separator)[0]),
                                 WarehouseCapacity = Int32.Parse(cellWood.Text.Split(separator)[1]),
                                 GranaryCapacity = Int32.Parse(cellCrop.Text.Split(separator)[1])
                             };
     Log.Debug(production.ToString());
     return production;
 }