from ca.base.generations import Generations from ca.base.gui import play class Worms(Generations): states = 6 def birth(self): return self.live_count in [2, 5] def survival(self): return self.live_count in [3, 4, 6, 7] play(Worms)
from ca.base.generations import Generations from ca.base.gui import play class StarWars(Generations): states = 4 def birth(self): return self.live_count == 2 def survival(self): return self.live_count in (3, 4, 5) play(StarWars)
from ca.base.life import Life from ca.base.gui import play class ConwaysLife(Life): def birth(self): return self.live_count in [3] def survival(self): return self.live_count in [2, 3] play(ConwaysLife)
from ca.base.generations import Generations from ca.base.gui import play class FireWorks(Generations): states= 21 def birth(self): return self.live_count in [1, 3] def survival(self): return self.live_count in [2] play(FireWorks)