]> git.saurik.com Git - wxWidgets.git/blob - demos/life/samples.inc
Oops.
[wxWidgets.git] / demos / life / samples.inc
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: samples.inc
3 // Purpose: Sample configurations for Life!
4 // Author: Guillermo Rodriguez Garcia, <guille@iies.es>
5 // Modified by:
6 // Created: Jan/2000
7 // RCS-ID: $Id$
8 // Copyright: (c) 2000, Guillermo Rodriguez Garcia
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // --------------------------------------------------------------------------
13 // sample configurations
14 // --------------------------------------------------------------------------
15
16 /* Format:
17 *
18 * Name,
19 * Description,
20 * Width,
21 * Height,
22 * Data ('*' = alive, '.' = dead)
23 *
24 */
25
26 const LifeShape g_shapes[] =
27 {
28 LifeShape( _("Glider"),
29 _("The glider is the first of a series of life forms, known "
30 "as spaceships or fishes, which can travel along the game "
31 "field retaining their original shape."),
32 3, 3,
33 ".*."
34 "..*"
35 "***"),
36 LifeShape( _("Heavyweight spaceship"),
37 _("The glider is just the smaller of the spaceships; this "
38 "one, known as the heavyweight spaceship or 'big fish', "
39 "is the largest spaceship which can travel alone without "
40 "destroying itself. Larger ones can only travel safely "
41 "if they are supported by smaller spaceships."),
42 7, 4,
43 ".....*."
44 "......*"
45 "*.....*"
46 ".******"),
47 LifeShape( _("Eater"),
48 _("An eater is any still life that can repair itself from "
49 "some attacks. This one (bottom right), also known as "
50 "'fishhook', eats gliders and fishes (spaceships) provided "
51 "that they approach in a certain angle."),
52 10, 10,
53 ".*........"
54 "..*......."
55 "***......."
56 ".........."
57 ".........."
58 ".........."
59 "......**.."
60 "......*.*."
61 "........*."
62 "........**" ),
63 LifeShape( _("Dice shaker"),
64 _("Oscillators have been extensively explored in Life!. "
65 "The dice shaker turns around each seven tics; thus, it "
66 "is an oscillator with a period of fourteen."),
67 7, 6,
68 ".**.**."
69 ".**.**."
70 "..*.*.."
71 "*.*.*.*"
72 "*.*.*.*"
73 "**...**" ),
74 LifeShape( _("Hertz oscillator"),
75 _("The Hertz oscillator is a good example of a set of life "
76 "patterns known as 'billiard tables'. A billiard table is "
77 "an oscillator which is built inside a stable border. In "
78 "particular, this one has a period of eight."),
79 14, 11,
80 ".....**......."
81 ".....**......."
82 ".............."
83 "**...****...**"
84 "*.*.*....*.*.*"
85 "..*.**...*.*.."
86 "*.*.*....*.*.*"
87 "**...****...**"
88 ".............."
89 ".......**....."
90 ".......**....." ),
91 LifeShape( _("Phoenix"),
92 _("A phoenix is a pattern whose cells all die in every "
93 "generation, and yet lives forever. For example, this is "
94 "a phoenix with period two."),
95 8, 8,
96 "....*..."
97 "..*.*..."
98 "......*."
99 "**......"
100 "......**"
101 ".*......"
102 "...*.*.."
103 "...*...." ),
104 LifeShape( _("R-pentomino"),
105 _("The R-pentomino is a methuselah - a life form which "
106 "lives for hundreds of generations without stabilizing "
107 "or dying. In particular, the R-Pentomino requires more "
108 "than one thousand tics to reach a stable (periodic) "
109 "state."),
110 3, 3,
111 ".**"
112 "**."
113 ".*." ),
114 LifeShape( _("Thunderbird"),
115 _("The thunderbird is another popular methuselah, which "
116 "doesn't stabilize until the 243th generation. Note that "
117 "because the initial configuration is symmetrical with "
118 "respect to the vertical axis, all generations must be "
119 "symmetrical as well."),
120 3, 5,
121 "***"
122 "..."
123 ".*."
124 ".*."
125 ".*." ),
126 LifeShape( _("Accorn"),
127 _("Probably the most popular methuselah, the accorn lives "
128 "for 5206 (!) generations."),
129 7, 3,
130 ".*....."
131 "...*..."
132 "**..***" ),
133 LifeShape( _("Galaxy"),
134 _("One from my personal collection. It is really beautiful "
135 "to see this configuration expand and shrink periodically "
136 "for hundreds of tics before reaching a stable state."),
137 13, 13,
138 "...***......."
139 "......*......"
140 "......*......"
141 "......*.....*"
142 ".....***....*"
143 "....*...*...*"
144 ".****...****."
145 "*...*...*...."
146 "*....***....."
147 "*.....*......"
148 "......*......"
149 "......*......"
150 ".......***..." ),
151 LifeShape( _("Glider gun"),
152 _("A gun is a stationary pattern that emits spaceships "
153 "forever. The glider gun shown here was the first known "
154 "gun, and indeed the first known finite pattern with "
155 "unbounded growth. It was found by Bill Gosper in "
156 "November 1970. Many new guns have since been found."),
157 36, 9,
158 ".........................*.........."
159 "......................****....*....."
160 ".............*.......****.....*....."
161 "............*.*......*..*.........**"
162 "...........*...**....****.........**"
163 "**.........*...**.....****.........."
164 "**.........*...**........*.........."
165 "............*.*....................."
166 ".............*......................" ),
167 LifeShape( _("Puffer train"),
168 _("A puffer is an object that moves like a spaceship, except "
169 "that it leaves a trail of debris behind. The puffer train "
170 "is one of the best-known puffers. Originally found by "
171 "Bill Gosper, this is a very dirty puffer; the tail does "
172 "not stabilize until generation 5533. It consists of a "
173 "B-heptomino (the middle pattern) escorted by two light "
174 "weight space ships."),
175 5, 18,
176 "...*."
177 "....*"
178 "*...*"
179 ".****"
180 "....."
181 "....."
182 "....."
183 "*...."
184 ".**.."
185 "..*.."
186 "..*.."
187 ".*..."
188 "....."
189 "....."
190 "...*."
191 "....*"
192 "*...*"
193 ".****" ),
194 LifeShape( _("Max"),
195 _("Max is the fastest-growing known pattern in Conway's Game "
196 "of Life (possibly the fastest possible). It fills space to "
197 "a density of 1/2, conjectured to be the maximum density, "
198 "and does it at a speed of c/2 in each of the 4 directions, "
199 "which has been proven to be the maximum possible speed.\n"
200 "\n"
201 "Population growth is:\n"
202 "[(t+19)^2+463]/4 for t divisible by 4;\n"
203 "[(t+19)^2+487]/4 for t even, not div. by 4;\n"
204 "[(t+18)^2+639]/4 for t odd.\n"
205 "\n"
206 "Original construction, top/bottom stretchers by Hartmut "
207 "Holzwart; Size optimization, left/right stretchers by David "
208 "Bell; Original idea, middle part, left/right stretcher "
209 "connection by Al Hensel.\n"
210 "\n"
211 "This spacefiller by David Bell, September 1993."),
212 29, 43,
213 ".....*.*....................."
214 "....*..*....................."
215 "...**........................"
216 "..*.........................."
217 ".****........................"
218 "*....*......................."
219 "*..*........................."
220 "*..*........................."
221 ".*.........***...***........."
222 "..****.*..*..*...*..*........"
223 "...*...*.....*...*..........."
224 "....*........*...*..........."
225 "....*.*......*...*..........."
226 "............................."
227 "...***.....***...***........."
228 "...**.......*.....*.........."
229 "...***......*******.........."
230 "...........*.......*........."
231 "....*.*...***********........"
232 "...*..*..*............**....."
233 "...*.....************...*...."
234 "...*...*.............*...*..."
235 "....*...************.....*..."
236 ".....**............*..*..*..."
237 "........***********...*.*...."
238 ".........*.......*..........."
239 "..........*******......***..."
240 "..........*.....*.......**..."
241 ".........***...***.....***..."
242 "............................."
243 "...........*...*......*.*...."
244 "...........*...*........*...."
245 "...........*...*.....*...*..."
246 "........*..*...*..*..*.****.."
247 ".........***...***.........*."
248 ".........................*..*"
249 ".........................*..*"
250 ".......................*....*"
251 "........................****."
252 "..........................*.."
253 "........................**..."
254 ".....................*..*...."
255 ".....................*.*....." )
256 };