int Evaluate(int[,] board, Tuple <int, int> move, int sign)
        {
            int oppSign = sign == 1 ? 2 : 1;
            int result  = 0;

            board[move.Item1, move.Item2] = sign;
            List <string> StringsToCheck = Utils.FindStrings(board, new int[] { move.Item1, move.Item2 }, qtyCellsForWin);

            board[move.Item1, move.Item2] = oppSign;
            StringsToCheck.AddRange(Utils.FindStrings(board, new int[] { move.Item1, move.Item2 }, qtyCellsForWin));
            board[move.Item1, move.Item2] = 0;
            PatternCollection patterns = sign == 1 ? ownPatterns : opponentPatterns;

            foreach (string item in StringsToCheck)
            {
                foreach (Pattern pattern in patterns.PatternList)
                {
                    if (item.Contains(pattern.PatternString))
                    {
                        result += pattern.Weight;
                    }
                }
            }
            return(result);
        }
 public MiniMax(int qtyCellsForWin)
 {
     this.qtyCellsForWin = qtyCellsForWin;
     ownPatterns         = new PatternCollection(qtyCellsForWin, 1);
     opponentPatterns    = new PatternCollection(qtyCellsForWin, 2);
 }