Пример #1
0
        public void addConstraints(int row, int column)
        {
            //detect if the new constraint is already in the constraint list

            //for each constraint in the list
            for(int i = 0; i < constraints.Count; i++)
            {
                //if the constraint is already in the list, return
                if(row == constraints[i].getRow() && column == constraints[i].getColumn())
                {
                    return;
                }
            }

            Constraints temp = new Constraints();
            temp.setRow(row);
            temp.setColumn(column);
            constraints.Add(temp);
        }
Пример #2
0
        public void addConstraints(int row, int column)
        {
            //detect if the new constraint is already in the constraint list

            //for each constraint in the list
            for (int i = 0; i < constraints.Count; i++)
            {
                //if the constraint is already in the list, return
                if (row == constraints[i].getRow() && column == constraints[i].getColumn())
                {
                    return;
                }
            }

            Constraints temp = new Constraints();

            temp.setRow(row);
            temp.setColumn(column);
            constraints.Add(temp);
        }