Skip to content

Instantly share code, notes, and snippets.

@Sobsz
Last active January 25, 2023 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sobsz/d37cfc1eb6de7a76fff5d39760d3c8bf to your computer and use it in GitHub Desktop.
Save Sobsz/d37cfc1eb6de7a76fff5d39760d3c8bf to your computer and use it in GitHub Desktop.
t = [[int((x-y)%7%3==0) for x in range(13)] for y in range(13)]
for _ in range(26): print(('\n'.join(''.join(' #'[x] for x in y) for y in t)+'\n'+'-'*len(t[0])+'\n',t:=[[int((sum(t[(y+n[1])%len(t)][(x+n[0])%len(t[0])] for n in {(x, y) for x in range(-1,2) for y in range(-1,2)}-{(0,0)}),t[y][x]) in ((2,1),(3,1),(3,0))) for x in range(len(t[0]))] for y in range(len(t))])[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment