namespace ClassLibrary1 { public class CBuilding6Board: CBoard { public CBuilding6Board() { h_Test(); } private void h_Test() { const int width = 4; const int height = 10; for (int i = 0; i < width; i++) { for(int j = 0; j < height; j++) { CHook cHook = new CHook(); HookList.Add(cHook); cHook.X = i; cHook.Y = j; } } for (int i = 0; i < 2; i++) { CLabelessKey pKey = new CLabelessKey(); pKey.KeyCount = Random.Shared.Next(1, 3); HookList[Random.Shared.Next(0, HookList.Count)].Key = pKey; } for (int i = 0; i < 10; i++) { CLabeledKey pKey = new CLabeledKey(); pKey.KeyCount = Random.Shared.Next(1, 3); int iIndex = Random.Shared.Next(0, HookList.Count); CHook pHook = HookList[iIndex]; pKey.Title = $"a.6{pHook.X}{pHook.Y:D2}"; HookList[iIndex].Key = pKey; } } } }