Package edu.wisc.game.engine
Class BoardConditionsChecker
java.lang.Object
edu.wisc.game.engine.BoardConditionsChecker
public class BoardConditionsChecker extends Object
For the training/testing restrictions on boards, as introduced in GS 6.010. See email discusion with Paul on 2023-03-08, and captive.html#cond
-
Constructor Summary
Constructors Constructor Description BoardConditionsChecker()
-
Method Summary
Modifier and Type Method Description static boolean
boardIsAcceptable(Board board, RuleSet rules, boolean testing)
In the training mode, the board is acceptable if no game piece satisfies any condition (i.e.
-
Constructor Details
-
BoardConditionsChecker
public BoardConditionsChecker()
-
-
Method Details
-
boardIsAcceptable
In the training mode, the board is acceptable if no game piece satisfies any condition (i.e. is accepted by any row). In the testing mode, the board is acceptable if at least one piece does.- Parameters:
board
- The board to testrules
- The conditions, formatted as a rule set. Each row of the rule set represents one condition.
-