private void _NL_SolResult(UCellLink LK0, UCellLink LKnxt, Stack <UCellLink> SolStack, int SolType) { string st = ""; List <UCellLink> SolLst = SolStack.ToList(); SolLst.Reverse(); SolLst.Add(LK0); foreach (var LK in SolLst) { int noB = (1 << LK.no); UCell P1 = pBDL[LK.rc1], P2 = pBDL[LK.rc2]; P2.SetCellBgColor(SolBkCr); if (LK.type == S) { P1.SetNoBColor(noB, AttCr); P2.SetNoBColor(noB, AttCr3); } else { P2.SetNoBColor(noB, AttCr); P1.SetNoBColor(noB, AttCr3); } } if (SolType == 1) { st = "Nice Loop(Continuous)"; //continuous } else //discontinuous { st = $"Nice Loop(Discontinuous) r{(LK0.rc1/9+1)}c{(LK0.rc1%9+1)}"; int dcTyp = LK0.type * 10 + LKnxt.type; switch (dcTyp) { case 11: st += $" is {(LK0.no+1)}"; break; //S->S case 12: st += $" is not {(LKnxt.no+1)}"; break; //S->W case 21: st += $" is not {(LK0.no+1)}"; break; //W->S case 22: st += $" is not {(LK0.no+1)}"; break; //W->W } } Result = st; ResultLong = st + "\r" + _ToRCSequenceString(SolStack); }