Пример #1
0
        public void AddAllNumberBlockCondition(int toNumber, int xFrom, int xTo, int yFrom, int yTo)
        {
            Fields ConditionFields = new Fields();

            for (int x = xFrom; x <= xTo; x++)
            {
                for (int y = yFrom; y <= yTo; y++)
                {
                    ConditionFields.Add(FieldList.At(x, y));
                }
            }
            AllNumberCondition cnd = new AllNumberCondition(toNumber, ConditionFields);

            Conditions.Add(cnd);
        }
Пример #2
0
        public void AddSumBlockCondition(int Sum, int xFrom, int xTo, int yFrom, int yTo)
        {
            Fields ConditionFields = new Fields();

            for (int x = xFrom; x <= xTo; x++)
            {
                for (int y = yFrom; y <= yTo; y++)
                {
                    ConditionFields.Add(FieldList.At(x, y));
                }
            }
            SumCondition cnd = new SumCondition(Sum, ConditionFields);

            Conditions.Add(cnd);
        }