## Creature Project ## CSC323: Group 1: Nora, Terian, Josh, and Jordan ## 4/7/10 ## Predicate.py: Contains the methods that call LogicPredicate and TestPredicate ###Borrowed code from Group 0 class Predicate: '''an interface for Predicates. No methods are actually implemented''' def __init__(self): pass def holds(self, world, location): 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, dn): self.desiredSpecies = ds self.desiredNum = dn #changed parameters of testpredicates to two values, a species and a number.