_3D_Madness.Board.Board C# (CSharp) Method

Board() public method

public Board ( Microsoft.Xna.Framework.Game g, Microsoft.Xna.Framework.Graphics.Texture2D txt1, Microsoft.Xna.Framework.Graphics.Texture2D txt2 ) : System
g Microsoft.Xna.Framework.Game
txt1 Microsoft.Xna.Framework.Graphics.Texture2D
txt2 Microsoft.Xna.Framework.Graphics.Texture2D
return System
        public Board(Game g, Texture2D txt1, Texture2D txt2)
            : base(g)
        {
            this.txt1 = txt1;
            this.txt2 = txt2;
            mainGameClass = (Game1)g;
            Effect = new BasicEffect(g.GraphicsDevice);

            rand_element = new XML_Parser();
            spriteBatch = new SpriteBatch(g.GraphicsDevice);
            numberOfRotation = 0;

            loadTexturesAt(@"Blocks\");

            initBoard();
            GenerateBoard();

            _board[10][10].Texture = elements[0].Texture;
            _board[10][10].leftEdge = elements[textureIndex].leftEdge;
            _board[10][10].rightEdge = elements[textureIndex].rightEdge;
            _board[10][10].upEdge = elements[textureIndex].upEdge;
            _board[10][10].bottomEdge = elements[textureIndex].bottomEdge;
            _board[10][10].additional = elements[textureIndex].additional;
            elements.RemoveAt(textureIndex);

            rand = new Random();
            textureIndex = rand.Next(0, elements.Count-1);
            NextBlock = elements[textureIndex].Texture;
        }