Time for action – drawing the screen – the play screen
Update the
Draw()
method of the Game1 class to add the code to draw the game board after the code that draws the title screen:if (gameState == GameStates.Playing) { spriteBatch.Begin(); spriteBatch.Draw(backgroundScreen, new Rectangle(0, 0, this.Window.ClientBounds.Width, this.Window.ClientBounds.Height), Color.White); for (int x = 0; x < GameBoard.GameBoardWidth; x++) for (int y = 0; y < GameBoard.GameBoardHeight; y++) { int pixelX = (int)gameBoardDisplayOrigin.X + (x * GamePiece.PieceWidth); int pixelY = (int)gameBoardDisplayOrigin.Y + (y * GamePiece.PieceHeight); spriteBatch.Draw( playingPieces, new Rectangle( pixelX, pixelY, GamePiece.PieceWidth, GamePiece.PieceHeight), ...