fiveham / Sudoku_Solver

Solve sudoku puzzles by representing the puzzle as a bipartite graph of truth-claims about cells' values and rule-statements that have exactly one true neighbor and removing edges as information is added
MIT License
0 stars 0 forks source link

Technique's extension of Function<Sudoku,Technique> doesn't guarantee that apply()'s return type is the type implementing Technique #22

Open fiveham opened 7 years ago

fiveham commented 7 years ago

Right now, ColorChain could define

public Sledgehammer apply(Sudoku s){
    return new Sledgehammer(s);
}

for example. Technique's implementing classes should be restricted to only be able to return instances of their own class from apply.