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