-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmelanie.mt
45 lines (40 loc) · 817 Bytes
/
melanie.mt
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
def even(x) {
answer = false;
div2 = x/2;
times2 = div2*2;
if (times2 == x) {
answer = true;
}
else {
answer = false;
}
return answer;
}
def main() {
map = new Flatmap("xmap", 300, 300, 100);
for (x=1; x < 300; x = x+1) {
for (y=1; y < 300; y = y+1) {
if ( even(x) ) {
p = new Point(x,y,0);
map.add(block(COBBLESTONE), p);
}
else {
p = new Point(x,y,0);
map.add(block(BRICK), p);
}
}
}
for (x=1; x < 300; x = x+1) {
for (y=300; y > 0; y = y-1) {
if ( even(x) ) {
p = new Point(x,y,0);
map.add(block(COBBLESTONE), p);
}
else {
p = new Point(x,y,0);
map.add(block(BRICK), p);
}
}
}
map.close();
}