Skip to content

Commit

Permalink
Merge pull request #353 from ThisMatt/new_puzzle-skyscrapers
Browse files Browse the repository at this point in the history
Case rules now use preemptive visibility
  • Loading branch information
ThisMatt authored Oct 28, 2022
2 parents 877093c + c737e61 commit ed13589
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public ArrayList<Board> getCasesFor(Board board, PuzzleElement puzzleElement, In
passed = passed && DupeRule.checkContradictionAt(newCase,newCell)!=null;
}
if(skyscrapersboard.getViewFlag()){
PreemptiveTooFewContradictionRule ViewRule = new PreemptiveTooFewContradictionRule();
PreemptiveVisibilityContradictionRule ViewRule = new PreemptiveVisibilityContradictionRule();
passed = passed && ViewRule.checkContradictionAt(newCase,newCell)!=null;
}
if(passed){cases.add(newCase);}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ public ArrayList<Board> getCases(Board board, PuzzleElement puzzleElement) {
passed = passed && DupeRule.checkContradictionAt(newCase,newCell)!=null;
}
if(skyscrapersboard.getViewFlag()){
InsufficientVisibilityContradictionRule fewRule = new InsufficientVisibilityContradictionRule();
ExceedingVisibilityContradictionRule moreRule = new ExceedingVisibilityContradictionRule();
passed = passed && fewRule.checkContradictionAt(newCase,newCell)!=null && moreRule.checkContradictionAt(newCase,newCell)!=null;
PreemptiveVisibilityContradictionRule ViewRule = new PreemptiveVisibilityContradictionRule();
passed = passed && ViewRule.checkContradictionAt(newCase,newCell)!=null;
}
//how should unresolved be handled? should it be?
if(passed){cases.add(newCase);}
Expand Down

0 comments on commit ed13589

Please sign in to comment.