Exemplo n.º 1
0
        public Block(List <Point> allPoints, int figureNum)
        {
            this.figureNum = figureNum;
            this.allPoints = allPoints;
            pList          = new List <Point>();
            pList_temp     = new List <Point>();
            isMove         = true;
            isStop         = false;

            FiguresList figures = new FiguresList();

            figuresLists = figures.GetList();

            string stringFigure = figuresLists[figureNum].First();
            int    height       = FigureHeight(stringFigure);

            int minY;

            MinPointYInList(allPoints, out minY);
            pList = String2Points(stringFigure, 4, 1);

            Draw();

            if (minY <= height)
            {
                isStop   = true;
                gameOver = true;
            }
        }
Exemplo n.º 2
0
        public Figure(int model)
        {
            FiguresList figures = new FiguresList();

            figuresLists = figures.GetList();
            figuresLists[1].Rotate();

            pList = String2Points(figuresLists[model].First(), 18, 2);
            Draw();
        }