/// <summary> /// 최초 값 세팅 /// </summary> public void InitDirectionAndSkill() { mustUpdate = true; SetSkillValue(); if (!isKicker) // keeper setting. { direction [0] = direction [1] = 100; direction [2] = direction [3] = direction [4] = 0; direction [AgUtil.RandomInclude(10, 500) % 2] = CalculateBalance(level); // 0 , 1 .. return; } Ag.LogStartWithStr(1, " WasCard :: ... SetDirection .... isKicker :: " + isKicker + " Start .... ID : " + ID); kickOrder = -1; int wideN = 1; switch (grade) { case "S": case "A": wideN = 3; break; case "B": wideN = 2; break; case "C": wideN = 2; break; case "D": break; } //Ag.LogString (" Is Grade S ?? " + tempS + " Current Grade :: " + grade); int width = GetDirectionWidthOfSmallArea(level); // 34 .. 38 .. // 방향바 0, 2, 4, 6 을 좁은 영역으로 세팅 for (int j = 0; j < 4; j++) { direction [j * 2] = width; } // SetWideDirection 조합으로 넓은 방향 선택. List <int> wideDirArr = AgUtil.CombiSelect(4, wideN); // (0, 2, 3) // in Case of B (different 2 dir), C (same 2 dir) if (grade == "C") { int dir = wideDirArr [0], dir2; if (dir < 2) { dir2 = dir + 2; } else { dir2 = dir - 2; } wideDirArr.Clear(); wideDirArr.Add(dir); wideDirArr.Add(dir2); } if (grade == "B") { int dir = wideDirArr [0], dir2, ran = AgUtil.RandomInclude(0, 100) % 2; // ran = 0 or 1 if (dir % 2 == 0) // 0, 2 { dir2 = ran * 2 + 1; // 1, 3 } else // 1, 3 { dir2 = ran * 2; // 0, 2 } wideDirArr.Clear(); wideDirArr.Add(dir); wideDirArr.Add(dir2); } for (int j = 0; j < wideN; j++) { int dir = wideDirArr [j] + 1; if (wideN == 1) { AddWideDirect(pWid: 1000, pDir: dir, pLast: false); break; } //if (j == 0) { int max = wideN > 2 ? 400 : 500; max = wideN == 4 ? 300 : max; //("wideN : " + wideN + " max " + max).HtLog (); AddWideDirect(pWid: AgUtil.RandomInclude(152, max), pDir: dir, pLast: j == wideN - 1); //continue; //} //int wid = 1000 / wideN; //AddWideDirect (pWid: AgUtil.RandomInclude (wid - 100, wid + 100), pDir: dir, pLast: j == wideN - 1); } // Set Small Direction Position List <int> smlDirArr = new List <int> (); smlDirArr.Add(0); smlDirArr.Add(1); smlDirArr.Add(2); smlDirArr.Add(3); foreach (int k in wideDirArr) { //Ag.LogString (" Small Direct is " + k); smlDirArr.Remove(k); } foreach (int sV in smlDirArr) { AddSmlDirect(sV + 1); } }