from OS_class import *

os = OS()

# MARK: name and delay
os.name = "Glider 2"
os.delay = 2

# MARK: bead types
os.categoryColors = { "G": {"name": "red500"} }
n = 8
G = ["G{}".format(i) for i in range(n)]

# MARK: rule
for i in range(n):
	os.add_attraction(G[i], G[(i+2)%n])

# MARK: seed conformation
os.seedConformation = [ G[0], NE, G[1], SE, G[2] ]

# MARK: transcript prefix and period
declarations = [	
	OS.declare("glider", G),
]
os.compactTranscriptPrefix = [
	declarations,
	OS.unfold(3, n, "glider"),
]
os.compactTranscriptPeriod = [
	declarations,
	"glider",
]
os.transcriptPeriodCount = 10

# MARK: save

os.save_as_json()
