-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.txt
More file actions
36 lines (34 loc) · 1.14 KB
/
example.txt
File metadata and controls
36 lines (34 loc) · 1.14 KB
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
world <width: int> <height: int> '.' <alphabet-size: int> '.' '#' ...
alias
set name '%'
...
end
rules <ruleName: count or pattern>
state 'x' to 'y' if
; count state
'a' may 1 2 ...
'b' nomay 3 5 ... ; equal "may 0 1 2 4 6 7 8"
...
; pattern state
'.' ',' any '.' any any ',' any ; respectively equal NW N NE W E SW S SE cells
end
...
end
setup
\ <- backslash for multiline or inner comment
correct x may be 0..width-1
correct y may be 0..height-1
\
cell '.' <x: int> <y: int>
linex '.' <x0: int> <y: int> <x1: int>
liney '.' <x: int> <y0: int> <y1: int>
rect '.' <x: int> <y: int> <width: int> <height: int>
pattern <x: int> <y: int> <width: int> <height: int> '.' ... width*height ... '.'
; in pattern maybe symbol or word 'any'. 'any' set "transparent" for pattern.
; it is used when it is necessary to save the cells of the world
random <x: int> <y: int> <width: int> <height: int>
; rle use first and second symbol from alphabet
; b = first, o = second
; example: rle 10 34 bo$2bo$3o!
rle <x: int> <y: int> <pattern: phrase>
end