/// <summary> /// Draw the score on the screen /// </summary> /// <param name="score">the score of the player</param> private void DrawScore(int score) { Console.ForegroundColor = ConsoleColor.Cyan; Console.SetCursorPosition(columns + 3, 6); Console.Write($"Score: {score}"); Console.SetCursorPosition(columns + 3, 7); Console.Write($"Level: {TetrisGame.GetLevelFromScore(score)}"); }
/// <summary> /// Display the current score to the screen /// </summary> /// <param name="score">the current score</param> private void DisplayScore(int score) { var action = new Action <int>((s) => InfoLabel.Text = string.Format(infoString, s, TetrisGame.GetLevelFromScore(s))); InfoLabel.Invoke(action, score); }