public static void BuilHive(Hive hive, int rnd, Bee bee) { if (hive.durability > 100) { hive.durability = 0; } else if (bee.Health == 0) { hive.durability += 0; hive.Honey += 0; } else { hive.durability += Convert.ToInt32((10 - Convert.ToInt32(10 * (rnd * 0.01))) * 0.5); if (hive.durability > 100) { hive.durability = 100; } hive.Honey = (hive.Pollen - (Convert.ToInt32(hive.Pollen * (rnd * 0.1)))) - Convert.ToInt32((hive.Pollen - (Convert.ToInt32(hive.Pollen * (rnd * 0.1)))) * 0.5); } }
private static void PrintHive(Hive hive) { Console.WriteLine("Hive \t Durability: {0} \t Honey: {1} \n", hive.durability, hive.Honey); }
private static void AttactHive(Hive hibe, int dame) { hibe.durability -= Math.Abs(Convert.ToInt32(0.05 * dame)); }