neuropercolation/src/cellular_automaton/ca_rule.py

14 lines
350 B
Python
Raw Normal View History

2018-12-01 14:14:22 +00:00
import abc
class CARule(abc.ABC):
@abc.abstractmethod
def evolve_cell(self, cell, neighbors):
"""
Evolves a cell and returns its new state as list of states.
:param cell: The cell to evolve.
:param neighbors: A list of its neighbors.
:return: The new state list.
"""
pass