Пример #1
0
        //создание новой фигуры
        public void NewFig()
        {
            var r = new Random();

            curY = 0;
            curX = 5;

            //FigType.rightL;//
            var t = (FigType)r.Next(0, 7);

            switch (t)
            {
            case FigType.line:
                fig = new Line();
                break;

            case FigType.pyramide:
                fig = new Pyramide();
                break;

            case FigType.leftZ:
                fig = new LeftZ();
                break;

            case FigType.leftL:
                fig = new LeftL();
                break;

            case FigType.rightZ:
                fig = new RightZ();
                break;

            case FigType.rightL:
                fig = new RightL();
                break;

            case FigType.square:
                fig = new Square();
                break;
            }

            Copy(); //отображение
        }
Пример #2
0
        //создание новой фигуры
        public void NewFig()
        {
            var r = new Random();
            curY = 0;
            curX = 5;

            //FigType.rightL;//
            var t = (FigType) r.Next(0, 7);
            switch(t)
            {
                case FigType.line: 
                    fig = new Line();
                    break;
                case FigType.pyramide: 
                    fig = new Pyramide();
                    break;
                case FigType.leftZ:
                    fig = new LeftZ();
                    break;
                case FigType.leftL:
                    fig = new LeftL();
                    break;
                case FigType.rightZ:
                    fig = new RightZ();
                    break;
                case FigType.rightL:
                    fig = new RightL();
                    break;
                case FigType.square:
                    fig = new Square();
                    break;

            }

            Copy(); //отображение         

        }