Beispiel #1
0
    static void Main()
    {
        Ground ground = new Ground();

        BlueFish   bluefish   = new BlueFish(35, 20);
        RedFish    redfish    = new RedFish(45, 38);
        YellowFish yellowfish = new YellowFish(30, 22);

        while (true)
        {
            bluefish.DrawFish();
            redfish.DrawFish();
            yellowfish.DrawFish();
            bluefish.MoveFish();
            redfish.MoveFish();
            yellowfish.MoveFish();
            Thread.Sleep(40);
        }

        while (true)
        {
            Console.Clear();

            Ceiling ceiling = new Ceiling();
            ceiling.Draw();

            Rock rock = new Rock();
            rock.Draw(50, 22);

            PauseTillNextFrame(1000);
        }
    }
    static void Main()
    {
        int frame = 1;
        while (true)
        {
            frame = -frame;

            Ceiling ceiling = new Ceiling();
            ceiling.SetWidth(80);
            if (frame == 1)
                ceiling.Draw('_');
            else
                ceiling.Draw('-');

            Rock rock = new Rock();
            rock.Draw();

            PauseTillNextFrame(300);
            Console.Clear();
        }
    }