def __init__(self, rule=0, states=[CellState(0, utility.Color((0.0, 0.0, 0.0))), CellState(1, utility.Color((250.0, 250.0, 250.0)))]): self.states = states self.rule = utility.lbase(rule, len(self.states)) if len(self.rule) == 0: self.rule = [0 for x in range(len(self.states) ** 9)]
def translateNumber(self, rep): return utility.lbase(rep, len(self.states))