Class RuleSet


  • public class RuleSet
    extends Object
    A RuleSet describes the rules of a game.
    • Field Detail

      • description

        public Vector<String> description
        An optional verbal description of the rule set, which may have been found in the comment lines on top of the rule set file.
      • display

        public String display
        The display name, to show in the Android app, without giving the user too much of a hint. (As per PK, 2023-01-24)
    • Method Detail

      • getFile

        public File getFile()
      • toSrc

        public String toSrc()
        Format as the source code of the rules set
      • listAllShapes

        public HashSet<Piece.Shape> listAllShapes()
        Lists all shapes used in this rule set.
      • listAllColors

        public HashSet<Piece.Color> listAllColors()
        Lists all colors used in this rule set.
      • listAllPropValues

        public TreeMap<String,​TreeSet<String>> listAllPropValues()
        Lists all properties, and all property values, used in this rule set. This is primarily used for correctness checking during the experiment plan validation.
      • listAllBucketVars

        public HashSet<String> listAllBucketVars()
        The list of variables mentioned in the bucket expressions in this row
      • isPositionMask

        public boolean isPositionMask()
        This method returns true if this RuleSet is purely a fixed position selector, i.e. it simply tells that certain positions are allowed. FIXME: this is not precise, but is just a heuristic, to help the random board generator when conditions are imposed