diff --git a/seagull/lifeforms/__init__.py b/seagull/lifeforms/__init__.py index 07afa6e..dd6974a 100644 --- a/seagull/lifeforms/__init__.py +++ b/seagull/lifeforms/__init__.py @@ -19,7 +19,7 @@ """ from .static import Box, Seed, Moon, Kite -from .oscillators import Blinker, Toad, Pulsar, FigureEight +from .oscillators import Blinker, Toad, Pulsar, FigureEight, Beacon from .gliders import Glider from .growers import Unbounded from .random import RandomBox @@ -34,6 +34,7 @@ "Toad", "Pulsar", "FigureEight", + "Beacon", "Glider", "Unbounded", "RandomBox", diff --git a/seagull/lifeforms/oscillators.py b/seagull/lifeforms/oscillators.py index 1a43f94..7805413 100644 --- a/seagull/lifeforms/oscillators.py +++ b/seagull/lifeforms/oscillators.py @@ -71,3 +71,18 @@ def layout(self) -> np.ndarray: X[0:3, 0:3] = 1 X[3:6, 3:6] = 1 return X + + +class Beacon(Lifeform): + """A Beacon lifeform oscillator""" + + def __init__(self): + """Initialize the class""" + super(Beacon, self).__init__() + + @property + def layout(self) -> np.ndarray: + X = np.zeros((4, 4)) + X[0:2, 0:2] = 1 + X[2:4, 2:4] = 1 + return X