~spl-devel/spl/default-branch

« back to all changes in this revision

Viewing changes to src/solver/ForcedNumber.jak

  • Committer: boxl
  • Author(s): Boxleitner Stefan
  • Date: 2009-09-10 14:34:29 UTC
  • Revision ID: boxl-20090910143429-pozo7fi2lu9efy7g
alternativĀ solverĀ implementation

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
 
3
 
public class ForcedNumber {
4
 
 
5
 
        protected boolean setForcedNumber(Board board) {
6
 
                boolean changed = false;
7
 
                Structure[] str = Structure.values();
8
 
                
 
1
public class ForcedNumber {//implements Solver {
 
2
 
 
3
        /*public Board solve(Board board) {
 
4
                Board solved = (Board) board.clone();
 
5
                Structure[] str = Structure.values();           
9
6
                for (int value = 1; value <= Field.POSSIBILITIES; value++) {
10
7
                        for (int i = 0; i < str.length; i++) {
11
8
                                for (int structNr = 0; structNr < Field.POSSIBILITIES; structNr++) {
22
19
                                        
23
20
                                        if (counter == 1) {                                             
24
21
                                                Field f = new Field(value);
25
 
                                                boolean result = board.setField(index, f);                                              
26
 
                                                if (result) {
27
 
                                                        changed = true;
28
 
                                                }
 
22
                                                boolean result = board.setField(index, f);
29
23
                                        }
30
24
                                }
31
25
                        }
32
 
                }               
33
 
                return changed;
34
 
        }
35
 
 
 
26
                }
 
27
                return board;
 
28
        }*/
36
29
}
 
 
b'\\ No newline at end of file'