Created
August 19, 2012 22:58
-
-
Save dlowe/3398371 to your computer and use it in GitHub Desktop.
rogue hack lab logo animation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import golly as g | |
g.new('rhl') | |
pattern = """ | |
...X........................................................... | |
..XX.....XXX.XXX.XXX.X.X.XXX....X.X.XXX.XXX.X.X....X...XXX.XXX. | |
.XX.X....X.X.X.X.X...X.X.X......X.X.X.X.X...X.X....X...X.X.X.X. | |
.XXX.....XX..X.X.X.X.X.X.XX.....XXX.XXX.X...XX.....X...XXX.XX.. | |
.XX.X....X.X.X.X.X.X.X.X.X......X.X.X.X.X...X.X....X...X.X.X.X. | |
..XX.....X.X.XXX.XXX.XXX.XXX....X.X.X.X.XXX.X.X....XXX.X.X.XXX. | |
...X........................................................... | |
""" | |
row = 0 | |
for line in pattern.split('\n'): | |
column = 0 | |
for c in line: | |
g.setcell(column, row, 1 if c == 'X' else 0) | |
column = column + 1 | |
row = row + 1 | |
g.setcolors([1,255,102,0]) | |
g.setpos('3', '4') | |
g.setmag(4) | |
g.update() | |
time.sleep(2) | |
x = 3 | |
for mag in range(4,-1,-1): | |
g.setmag(mag) | |
for _ in range(6): | |
g.setpos(str(x), '4') | |
g.update() | |
time.sleep(0.1) | |
x = x + 1 | |
for _ in range(4): | |
g.step() | |
g.update() | |
time.sleep(0.6) | |
for mag in range(0,5,1): | |
g.setmag(mag) | |
for _ in range(6 if mag < 4 else 5): | |
g.setpos(str(x), '4') | |
g.update() | |
time.sleep(0.1) | |
x = x + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment