Ejemplo n.º 1
0
 internal void Claim(ClueSolver clue)
 {
     if (clue.OwnerLine.line == cell.Row)
     {
         if (ConfirmedClues.X == null) OwnerPuzzle.Changed = true;
         ConfirmedClues.X = clue;
     }
     if (clue.OwnerLine.line == cell.Column)
     {
         if (ConfirmedClues.Y == null) OwnerPuzzle.Changed = true;
         ConfirmedClues.Y = clue;
     }
 }
Ejemplo n.º 2
0
        public LineSolver(Line line)
        {
            // TODO: Complete member initialization
            this.line = line;

            cellSolvers = new List <CellSolver>();
            foreach (var cell in line.Cells)
            {
            }

            clueSolvers = new List <ClueSolver>();
            foreach (var clue in line.Clues)
            {
                var clueSolver = new ClueSolver(clue);
                clueSolver.OwnerLine = this;
                clueSolvers.Add(clueSolver);
            }
        }
Ejemplo n.º 3
0
 internal void Claim(ClueSolver clue)
 {
     if (clue.OwnerLine.line == cell.Row)
     {
         if (ConfirmedClues.X == null)
         {
             OwnerPuzzle.Changed = true;
         }
         ConfirmedClues.X = clue;
     }
     if (clue.OwnerLine.line == cell.Column)
     {
         if (ConfirmedClues.Y == null)
         {
             OwnerPuzzle.Changed = true;
         }
         ConfirmedClues.Y = clue;
     }
 }
Ejemplo n.º 4
0
        public LineSolver(Line line)
        {
            // TODO: Complete member initialization
            this.line = line;

            cellSolvers = new List<CellSolver>();
            foreach (var cell in line.Cells)
            {

            }

            clueSolvers = new List<ClueSolver>();
            foreach (var clue in line.Clues)
            {
                var clueSolver = new ClueSolver(clue);
                clueSolver.OwnerLine = this;
                clueSolvers.Add(clueSolver);
            }
        }
Ejemplo n.º 5
0
 internal bool IsAvaliable(ClueSolver clue)
 {
     return(GetConfirmedClue(clue.OwnerLine) == clue || GetConfirmedClue(clue.OwnerLine) == null);
 }
Ejemplo n.º 6
0
        internal bool IsOnlyClue(ClueSolver clue)
        {
            var list = FindClues(clue.OwnerLine);

            return(list.Contains(clue) && list.Count == 1);
        }
Ejemplo n.º 7
0
 internal bool IsOnlyClue(ClueSolver clue)
 {
     var list = FindClues(clue.OwnerLine);
     return list.Contains(clue) && list.Count == 1;
 }
Ejemplo n.º 8
0
 internal bool IsAvaliable(ClueSolver clue)
 {
     return (GetConfirmedClue(clue.OwnerLine) == clue || GetConfirmedClue(clue.OwnerLine) == null);
 }