/// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // STUDENTS: CREATE THE BOARD OBJECT HERE, MAKING SURE THE BOARD IS CENTERED IN THE WINDOW
            board = new Board(Content, graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2);

            // STUDENTS: CREATE QUIT BUTTON HERE, CENTERED HORIZONTALLY AND WITH A REASONABLE SPACE ABOVE THE BOTTOM OF THE WINDOW
            quitButton = new QuitButton(Content, graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferWidth / 8, GameState.Quit);
        }
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // STUDENTS: CREATE THE BOARD OBJECT HERE, MAKING SURE THE BOARD IS CENTERED IN THE WINDOW
            // Create a new board centered at the given location
            board = new Board(Content, WINDOW_WIDTH / 2, WINDOW_HEIGHT / 2);

            // STUDENTS: CREATE QUIT BUTTON HERE, CENTERED HORIZONTALLY AND WITH A REASONABLE SPACE ABOVE THE BOTTOM OF THE WINDOW
            quitButton = new QuitButton(Content, WINDOW_WIDTH / 2, WINDOW_HEIGHT - 80, GameState.Quit);
        }
Example #3
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // STUDENTS: CREATE THE BOARD OBJECT HERE, MAKING SURE THE BOARD IS CENTERED IN THE WINDOW
            board = new Board(Content, graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2);

            // STUDENTS: CREATE QUIT BUTTON HERE, CENTERED HORIZONTALLY AND WITH A REASONABLE SPACE ABOVE THE BOTTOM OF THE WINDOW
            quitButton = new QuitButton(Content, graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferWidth/8, GameState.Quit);
        }
Example #4
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            //creates the board, its squares and the quitbutton
            board = new Board(Content, WINDOW_WIDTH / 2, WINDOW_HEIGHT / 2);
            bSquare = new BoardSquare(Content, 0, 0);
            qButton = new QuitButton(Content, WINDOW_WIDTH / 2, WINDOW_HEIGHT - 50, GameState.Quit);
        }