Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            string         townName        = "Энск";
            int            buildings       = 1000;
            int            days            = 30;
            double         fireProbability = 1e-3;
            TownWithEvents town            = new
                                             TownWithEvents(townName, buildings, days, fireProbability);
            FireMen fireMen = new FireMen(town);

            Console.WriteLine("События в городе " + townName);
            town.TownLife();
            Console.ReadLine();
        }
Ejemplo n.º 2
0
 public FireMen(TownWithEvents twe)
 {
     this.MyNativeTown       = twe;
     MyNativeTown.fireEvent += new FireEvent(FireHandler);
 }