-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathShipLocationCaseRule.java
More file actions
59 lines (53 loc) · 1.9 KB
/
ShipLocationCaseRule.java
File metadata and controls
59 lines (53 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package edu.rpi.legup.puzzle.battleship.rules;
import edu.rpi.legup.model.gameboard.Board;
import edu.rpi.legup.model.gameboard.CaseBoard;
import edu.rpi.legup.model.gameboard.PuzzleElement;
import edu.rpi.legup.model.rules.CaseRule;
import edu.rpi.legup.model.tree.TreeTransition;
import java.util.ArrayList;
public class ShipLocationCaseRule extends CaseRule {
public ShipLocationCaseRule() {
super(
"BTSP-CASE-0002",
"Ship Location",
"",
"edu/rpi/legup/images/battleship/cases/ShipLocations.png");
}
/**
* Checks whether the child node logically follows from the parent node at the specific
* puzzleElement index using this rule. This method is the one that should overridden in child
* classes.
*
* @param transition transition to check
* @param puzzleElement equivalent puzzleElement
* @return null if the child node logically follow from the parent node at the specified
* puzzleElement, otherwise error message
*/
@Override
public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElement) {
return null;
}
/**
* Gets the case board that indicates where this case rule can be applied on the given {@link
* Board}.
*
* @param board board to find locations where this case rule can be applied
* @return a case board
*/
@Override
public CaseBoard getCaseBoard(Board board) {
return null;
}
/**
* Gets the possible cases for this {@link Board} at a specific {@link PuzzleElement} based on
* this case rule.
*
* @param board the current board state
* @param puzzleElement equivalent puzzleElement
* @return a list of elements the specified could be
*/
@Override
public ArrayList<Board> getCases(Board board, PuzzleElement puzzleElement) {
return null;
}
}