class Predicate: '''an interface for Predicates. No methods are actually implemented''' def __init__(self): pass def holds(self, board, coordinates): pass def __str__(self): pass class LogicPredicate(Predicate): '''an abstract class for logic predicates like AND OR NOT. It implements a constructor that accepts a list of predicates''' def __init__(self, *predlist): self.predicateList = predlist class TestPredicate(Predicate): '''an abstract class for predicates that actually look at a state It implements an init method that accepts a dictionary that contains the state to check for''' def __init__(self, ds): self.desiredState = ds #a dictionary describing the desired state