using ClassLibrary1; namespace ConsoleApp1 { internal class Program { static void Main(string[] args) { const int width = 8; const int height = 2; CBuilding6Board pBoard = new CBuilding6Board(); foreach (var hook in pBoard.HookList) { Console.SetCursorPosition(hook.Y * width, hook.X * height); string label = "-"; if (hook.Key != null) { if (hook.Key is CLabeledKey hh) { label = hh.Title; } else { label = "..."; } } Console.Write(label); } for (int i = 0; i < 4; i++) { Console.WriteLine($"Ключей на {i} этаже - {pBoard.GetFloorKeyCount(i)}"); } Console.WriteLine($"Всего: {pBoard.GetKeyCount()}"); Console.ReadKey(); } } }