protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
spriteBatch.Begin();
// Draw the background
spriteBatch.Draw(background, new Rectangle(250, 200, 320, 768), Color.White);
// Draw the ghost piece
// currentTetromino?.DrawGhost(spriteBatch, BoardLocation);
// Draw the board
gameBoard.Draw(spriteBatch, BoardLocation, texture1px);
nextBlockBoards.Draw(spriteBatch, nextBlockBoardsLocation, texture1px);
// Draw Game Info
// Score
spriteBatch.DrawString(GameFont, String.Format("Score: {0}", Score), new Vector2(50, 60), Color.White);
// Level
spriteBatch.DrawString(GameFont, String.Format("Level: {0}", Level), new Vector2(50, 110), Color.White);
// Lines
spriteBatch.DrawString(GameFont, String.Format("Lines: {0}", Lines), new Vector2(50, 160), Color.White);
player.Draw(spriteBatch, position1);
if (GameOver)
{
// Draw game over screen
spriteBatch.DrawString(GameFont, "Game Over!\nPress Enter to restart.", new Vector2(50, 210), Color.Red);
}
// Display the debug Window
//DrawDebugWindow(spriteBatch);
spriteBatch.End();
base.Draw(gameTime);
}