public static void Initialize() { Limits.Clear(); Sonidos.StopBGM(); Sonidos.PlayBGM(); Limits.Draw(4, "Green"); Console.ForegroundColor = ConsoleColor.DarkRed; for (int i = 0; i < 12; i++) { Console.SetCursorPosition(i, 0); Console.Write("█"); } for (int i = 1; i < 5; i++) { Console.SetCursorPosition(0, i); Console.Write("█"); Console.SetCursorPosition(11, i); Console.Write("█"); } Console.ResetColor(); Lose = false; Score = 0; Lines = 0; Level = 0; for (int i = 1; i < 24; i++) { for (int j = 1; j < 11; j++) { Matriz[j, i] = false; } } for (int i = 0; i < 12; i++) { Matriz[i, 0] = true; Matriz[i, 24] = true; } for (int i = 0; i < 25; i++) { Matriz[0, i] = true; Matriz[11, i] = true; } UpdateStatus(); }
void _Draw() { _Ui_GameBox.Clear(); if (_Level == null) { return; } int width = _Ui_GameBox.DrawingWidth / _Level.Width; int height = _Ui_GameBox.DrawingHeight / _Level.Height; foreach (Brick brick in _Level.GetAll()) { _Ui_GameBox.FillRectangle(brick.Color, width * brick.X, height * brick.Y, width, height); } _Ui_Scoreboard.ChangeItemValue(_nicknamePrefix + Nickname, "" + (_Level.Score * 10)); }