static void InitUi(int x, int y) { Console.CursorVisible = false; ConsoleSize.SetWindowSize(x + 2, y + 7); Console.SetCursorPosition(0, 0); ConsoleWrite.WriteRowOf('#'); for (int i = 0; i < y; i++) { Console.Write("#"); for (int j = 0; j < x; j++) { Console.Write(" "); } Console.Write("#"); } ConsoleWrite.WriteRowOf('#'); ConsoleWrite.WriteCentered("Snake"); ShowScore(y, 0); }