-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSource.ulam
46 lines (41 loc) · 858 Bytes
/
Source.ulam
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
use Propagator;
/**
\color #fff
\symbol Sr
\symmetries normal
*/
element Source : Propagate
{
ARGB baseCol;
Void initSelf()
{
ip = 0; //placing a seed starts out as a well
Random rd;
ColorValue r = (ColorValue)rd.between(30, 256);
ColorValue g = (ColorValue)rd.between(30, 256);
ColorValue b = (ColorValue)rd.between(30, 256);
baseCol[1] = r;
baseCol[2] = g;
baseCol[3] = b;
}
Void emptySpace(Neighbour i)
{
Propagator p;
p.baseCol = baseCol;
if(i < 5)
p.ip = 2;
else
p.ip = 3;
ew[i] = (Atom)p;
}
Void captureSpace(Neighbour i)
{
Propagator p;
p.baseCol = baseCol;
if(i < 5)
p.ip = 2;
else
p.ip = 3;
ew[i] = (Atom)p;
}
}