-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created EliminateTheImpossible direct rule
- Loading branch information
1 parent
62b7811
commit ee22ec0
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
src/main/java/edu/rpi/legup/puzzle/binary/rules/EliminateTheImpossible.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package edu.rpi.legup.puzzle.binary.rules; | ||
|
||
|
||
import edu.rpi.legup.model.gameboard.Board; | ||
import edu.rpi.legup.model.gameboard.PuzzleElement; | ||
import edu.rpi.legup.model.rules.DirectRule; | ||
import edu.rpi.legup.model.tree.TreeNode; | ||
import edu.rpi.legup.model.tree.TreeTransition; | ||
import edu.rpi.legup.puzzle.binary.BinaryBoard; | ||
import edu.rpi.legup.puzzle.binary.BinaryCell; | ||
|
||
public class EliminateTheImpossible extends DirectRule { | ||
private final String INVALID_USE_MESSAGE = "Number at cell is incorrect"; | ||
|
||
public EliminateTheImpossible() { | ||
super( | ||
"BINA-BASC-0003", | ||
"Eliminate The Impossible", | ||
"If three adjacent empty cells are open, prevents a trio of numbers to exist", | ||
"edu/rpi/legup/images/binary/rules/OneTileGapDirectRule.png"); | ||
} | ||
|
||
@Override | ||
public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElement) { | ||
BinaryBoard origBoard = (BinaryBoard) transition.getParents().get(0).getBoard(); | ||
BinaryCell binaryCell = (BinaryCell) puzzleElement; | ||
|
||
return "Grouping of Three Ones or Zeros not found"; | ||
} | ||
|
||
@Override | ||
public Board getDefaultBoard(TreeNode node) { | ||
return null; | ||
} | ||
} |