Exemple #1
0
        //---------------------------------------------------------------------
        // GamePlay testing Grid environment set-up methods
        //---------------------------------------------------------------------

        public void InitTestingBlockGrid_NonConsecutiveLinesScenario(BlockGrid grid)
        {
            if (grid.GetGridRowCount() == 30 && grid.GetGridColumnCount() == 10)
            {
                GameShape shape1 = new SquareShape(new Block(0, 1));
                grid.PlaceShape(shape1);

                GameShape shape2 = new SquareShape(new Block(2, 1));
                grid.PlaceShape(shape2);

                GameShape shape3 = new SquareShape(new Block(4, 1));
                grid.PlaceShape(shape3);

                GameShape shape4 = new SquareShape(new Block(6, 1));
                grid.PlaceShape(shape4);

                //NOTE:: Line only removed on is.Placed update (when a block is placed -- checks if lines need to be removed)
                GameShape shape5 = new LineShape(new Block(8, 2), ShapeRenderer.Orientation.ORIENT_1);
                grid.PlaceShape(shape5);

                // Non consecutive line

                GameShape shape6 = new SquareShape(new Block(6, 3));
                grid.PlaceShape(shape6);

                GameShape shape7 = new L2Shape(new Block(2, 3));
                grid.PlaceShape(shape7);

                GameShape shape8 = new L2Shape(new Block(5, 3));
                grid.PlaceShape(shape8);
            }
        }
Exemple #2
0
        private L2Shape BasicShapeInitialize(out List <Vector2> coordinates, ShapeRenderer.Orientation ori)
        {
            Block   anchor = new Block(100, 100);
            L2Shape L_2    = new L2Shape(anchor, ori);

            coordinates = new List <Vector2>();
            foreach (Block b in L_2.blocks)
            {
                coordinates.Add(new Vector2(b.GetX(), b.GetY()));
            }

            return(L_2);
        }