Esempio n. 1
0
        private void RememberPossibleCellValues()
        {
            if (CellValue.RealValues.Contains(Value))
            {
                return;
            }

            foreach (var value in Sqr.ImpossibleValues)
            {
                RememberValueCanNotBe(value);
            }

            foreach (var value in Sqr.PossibleValues)
            {
                if (CanBe(value) == Tristate.No)
                {
                    continue;
                }

                if (Row.Contains(value))
                {
                    RememberValueCanNotBe(value); continue;
                }
                if (Col.Contains(value))
                {
                    RememberValueCanNotBe(value); continue;
                }

                RememberValueCanBe(value);
            }
        }
Esempio n. 2
0
        private bool ExistsAlreadyInGroup(CellValue value)
        {
            if (Row.Contains(value))
            {
                return(true);
            }
            if (Col.Contains(value))
            {
                return(true);
            }
            if (Sqr.Contains(value))
            {
                return(true);
            }

            return(false);
        }