public ActionType WhatResult2(TPosition Pos) { TAnalysisRes Res = new TAnalysisRes(); TFinal Finals = new TFinal(); foreach (TCoords C in Finals.ForWin) { Res = C.What(Pos); if (Res.Act == ActionType.Def) { return(ActionType.Def); } } foreach (TCoords C in Finals.ForWin) { Res = C.What(Pos); if (Res.Act == ActionType.Win) { return(ActionType.Win); } } return(ActionType.Neutral); }
TAnalysisRes IsWin() { TAnalysisRes Res = new TAnalysisRes(); TFinal Finals = new TFinal(); foreach (TCoords C in Finals.ForWin) { Res = C.What(Pos); if (Res.Act == ActionType.Win) { return(Res); } } foreach (TCoords C in Finals.ForWin) { Res = C.What(Pos); if (Res.Act == ActionType.Def) { return(Res); } } foreach (TCoords C in Finals.ForWin) { Res = C.What(Pos); if (Res.Act == ActionType.Neutral) { return(Res); } } return(Res); }