File: pd-glider.py

package info (click to toggle)
golly 2.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 9,560 kB
  • ctags: 5,064
  • sloc: cpp: 38,119; python: 3,203; perl: 1,121; makefile: 58; java: 49; sh: 22
file content (17 lines) | stat: -rw-r--r-- 397 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Creates a large set of pentadecathlon + glider collisions.
# Based on pd_glider.py from PLife (http://plife.sourceforge.net/).

from glife.base import *

rule("B3/S23")

def collision (i, j):
	return pentadecathlon + glider[i + 11] (-8 + j, -10, flip)

all = pattern ()

for i in xrange (-7, 8):
	for j in xrange (-9, 10):
		all += collision (i, j) (100 * i, 100 * j)

all.display ("pd-glider")