Пример #1
0
    static void Main()
    {
        Console.SetWindowSize(80, 25);
        Console.SetBufferSize(80, 25);
        Aquarium aq = new Aquarium();

        ClownFish c = new ClownFish();

        c.X = 15; c.Y = 16;

        Trout t = new Trout();

        t.X = 5; t.Y = 6;

        Shark s = new Shark();

        s.X = 60; s.Y = 22;

        Rock r1 = new Rock();

        r1.X = 10; r1.Y = 24;

        Rock r2 = new Rock();

        r2.X = 40; r2.Y = 24;

        Coral co = new Coral();

        co.X = 18; co.Y = 19;

        do
        {
            System.Console.Clear();
            c.Swim();
            t.Swim();
            s.Swim();
            c.Display();
            t.Display();
            s.Display();
            co.Display();
            r1.Display();
            r2.Display();
            System.Threading.Thread.Sleep(200);
        } while (true);
    }