After experiencing the pain of manually inputting stuff into a table, I decided to make a program to generate it. How to use: First, in Golly, switch your rule to LifeSuper. Then, make your pattern, where the state mappings are:
State 0 --> 0
State 1 --> 1
State 2 --> *
State 3 --> 0'
State 4 --> 1'
State 5 --> *'
The later states are variables. - signs are not currently supported. You have to run this script once for every state
Code: Select all
import golly as g
output=""
convertlist=["0","1","*","0'","1'","*'","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t"]
rect=g.getselrect()
if len(rect)==0:
g.exit(message="No selection!")
else:
for y in range(rect[1],rect[1]+rect[3]):
for x in range(rect[0],rect[0]+rect[2]):
if x==rect[0]:
if y==rect[1]:
output=str(convertlist[g.getcell(x,y)])
else:
output+="\n"+str(convertlist[g.getcell(x,y)])
else:
output+=","+str(convertlist[g.getcell(x,y)])
with open("llsmakeroutput.txt","w") as f:
f.write(output)
g.show('Done!')
The script will store it in a file called llsmakeroutput.txt.
Edit: Whoops, included a part from a previous version. fixed.
Edit: Whoops, said whoops instead of fixed. fixed