Example #1
0
def main(stdscr):
    try:
        player = cage.CursesPlayer(stdscr)
        map = cage.VonNeumannMap(player.size)
        automaton = cage.TwoStateReductionAutomaton(map, operator.xor)
        cage.SeedInitializer(5).initialize(automaton)
        player.main(automaton)
    finally:
        player.done()
Example #2
0
 def __init__(self, size):
     cage.SynchronousAutomaton.__init__(self, cage.VonNeumannMap(size))
Example #3
0
 def __init__(self, size, states, threshold):
     cage.SynchronousAutomaton.__init__(self, cage.VonNeumannMap(size))
     self.states = states
     self.threshold = threshold