-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlife.tex
54 lines (43 loc) · 1.56 KB
/
life.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
% !TEX TS-program = pdftex
%%
%% # Conway's Game of Life - a (finite) implementation in TeX. #
%%
%% Please follow the github repository at
%% https://github.com/Planted363/Game_of_Life-in-TeX.
%%
\catcode`@=11\relax
\input life_setup
\input life_engine
\input life_xinput
\input life_qinput
\catcode`@=12\relax
%% Paste the pattern here (RLE format) and how many iterations to generate.
%% The formatting is somewhat strict, spaces cannot be omitted,
%% and the rule may only be specified in the B/S notation.
%% A typical pattern with standard rules.
\gameinput{
#N Gosper Glider Gun
#C A true period 30 glider gun.
x = 36, y = 9, rule = B3/S23
24bo11b$22bobo11b$12b2o6b2o12b2o$11bo3bo4b2o12b2o$2o8bo5bo3b2o14b$2o8b
o3bob2o4bobo11b$10bo5bo7bo11b$11bo3bo20b$12b2o!
}{50}
%% A replicator in the Highlife rule.
\gameinput{
#N Replicator
#O Nathan Thompson
#C A replicator for the HighLife rule.
x = 5, y = 5, rule = B36/S23
2b3o$bo2bo$o3bo$o2bob$3o!
}{50}
%% A spaceship in a nonstandard rule (Day & Night).
\gameinput{
x = 29, y = 24, rule = B3678/S34678
8bo$7bob2o10b2o$6b2obobo6bob2o$6bo2bobo2b2o3bo2bo$2bo4b2o2b2obob3ob3o$bobob2o
2b2o2bo2bo2bob3o$b2o2bobob3o5bob3obo$o3bob4o2b3o2bobo2b2o3bo$2obob2o3b5obo3b
2o2b2obo$2b2o3b11o6b3o$b2o4b12o5bobobo$2obo3bob12o4b3o$2obo3bob12o4b3o$b2o4b
12o5bobobo$2b2o3b11o6b3o$2obob2o3b5obo3b2o2b2obo$o3bob4o2b3o2bobo2b2o3bo$b2o
2bobob3o5bob3obo$bobob2o2b2o2bo2bo2bob3o$2bo4b2o2b2obob3ob3o$6bo2bobo2b2o3bo
2bo$6b2obobo6bob2o$7bob2o10b2o$8bo!
}{50}
\bye