mirror of https://github.com/dirtbags/moth.git
better tanx
This commit is contained in:
parent
64e3753e51
commit
1225ddac81
|
@ -136,6 +136,11 @@ main(int argc, char *argv[])
|
|||
read_until_char(map, hash, sizeof(hash), '\n');
|
||||
points = atol(points_str);
|
||||
|
||||
if (0 == points) {
|
||||
printf(" <span title=\"Category Complete\">⁂</span>\n");
|
||||
break;
|
||||
}
|
||||
|
||||
printf(" <a href=\"/%s/%s/\">%ld</a>\n", cat, hash, points);
|
||||
|
||||
if (points > maxpoints) break;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Nick Moffitt <nick@zork.net>
|
|
@ -0,0 +1 @@
|
|||
Ant Lion
|
|
@ -0,0 +1,22 @@
|
|||
get-turret 6 + set-turret!
|
||||
0 0 set-speed!
|
||||
|
||||
1 sensor? { get-turret 60 - set-turret! } if
|
||||
2 sensor? { get-turret 60 + set-turret! } if
|
||||
0 sensor? {
|
||||
fire-ready? { 0 0 set-speed! fire! } if
|
||||
fire-ready? ! set-led!
|
||||
} if
|
||||
|
||||
6 sensor? {
|
||||
0 set-turret! ( stay on target, stay on target... )
|
||||
3 sensor? { -40 -40 set-speed! } if ( back dat tank up )
|
||||
4 sensor? { 25 50 set-speed! } if ( hook )
|
||||
5 sensor? { 50 25 set-speed! } if ( slice )
|
||||
} {
|
||||
3 sensor? { -100 -100 set-speed! } if ( back dat tank up )
|
||||
4 sensor? { 50 100 set-speed! } if ( hook )
|
||||
5 sensor? { 100 50 set-speed! } if ( slice )
|
||||
} ifelse
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
50 0 5 1
|
|
@ -0,0 +1 @@
|
|||
100 268 177 1
|
|
@ -0,0 +1 @@
|
|||
100 92 178 1
|
|
@ -0,0 +1 @@
|
|||
60 0 120
|
|
@ -0,0 +1 @@
|
|||
60 120 120
|
|
@ -0,0 +1 @@
|
|||
60 240 120
|
|
@ -0,0 +1 @@
|
|||
100 0 5 1
|
|
@ -0,0 +1 @@
|
|||
Curtis Hash <chash@lanl.gov>
|
|
@ -0,0 +1 @@
|
|||
ChashTank
|
|
@ -0,0 +1,41 @@
|
|||
( move back and forth )
|
||||
0 set-turret!
|
||||
6 random 2 < { 95 75 set-speed! } { 90 90 set-speed! } ifelse
|
||||
|
||||
( rear sensor )
|
||||
4 sensor? { 90 90 set-speed! } if
|
||||
|
||||
( far right front sensor )
|
||||
5 sensor? { 100 -100 set-speed! } if
|
||||
|
||||
( far left front sensor )
|
||||
6 sensor? { -100 100 set-speed! } if
|
||||
|
||||
( right front sensor )
|
||||
2 sensor? { 80 -80 set-speed! } if
|
||||
|
||||
( left front sensor )
|
||||
3 sensor? { -80 80 set-speed! } if
|
||||
|
||||
( immediate front sensor in firing range )
|
||||
0 sensor?
|
||||
{
|
||||
fire-ready?
|
||||
{ fire! }
|
||||
{ -50 -50 set-speed! }
|
||||
ifelse
|
||||
}
|
||||
if
|
||||
|
||||
( near far right front sensor )
|
||||
8 sensor? { 60 -60 set-speed! } if
|
||||
9 sensor? { -60 60 set-speed! } if
|
||||
|
||||
fire-ready? set-led!
|
||||
|
||||
( front far sensor )
|
||||
7 sensor? fire-ready? & { 100 100 set-speed! } if
|
||||
|
||||
( collison sensor )
|
||||
1 sensor? { -100 -100 set-speed! 0 set-turret! } if
|
||||
|
|
@ -0,0 +1 @@
|
|||
50 0 10 1
|
|
@ -0,0 +1 @@
|
|||
35 0 90 0
|
|
@ -0,0 +1 @@
|
|||
100 30 59 0
|
|
@ -0,0 +1 @@
|
|||
100 330 59 0
|
|
@ -0,0 +1 @@
|
|||
70 180 180 0
|
|
@ -0,0 +1 @@
|
|||
100 90 59 0
|
|
@ -0,0 +1 @@
|
|||
100 270 59 0
|
|
@ -0,0 +1 @@
|
|||
100 0 5 1
|
|
@ -0,0 +1 @@
|
|||
55 50 89 0
|
|
@ -0,0 +1 @@
|
|||
55 310 89 0
|
|
@ -0,0 +1 @@
|
|||
Neale Pickett <neale@lanl.gov>
|
|
@ -0,0 +1 @@
|
|||
Crashmaster
|
|
@ -0,0 +1,38 @@
|
|||
( Mem 0: Turn number )
|
||||
0 mget
|
||||
1 +
|
||||
0 mset
|
||||
|
||||
0 mget 30 % 10 / ( [0..2], changes every 10 turns )
|
||||
dup 0 = { 80 80 set-speed! } if
|
||||
dup 1 = { 60 80 set-speed! } if
|
||||
2 = { 80 60 set-speed! } if
|
||||
|
||||
0 set-turret!
|
||||
|
||||
fire-ready? set-led!
|
||||
|
||||
fire-ready?
|
||||
{
|
||||
( Behavior for when we can shoot )
|
||||
|
||||
0 sensor? { fire! } if
|
||||
1 sensor? { 10 10 set-speed! 0 set-turret! } if
|
||||
2 sensor? { 10 10 set-speed! 0 set-turret! } if
|
||||
3 sensor? { 0 60 set-speed! get-turret 50 - set-turret! } if
|
||||
4 sensor? { 60 0 set-speed! get-turret 50 + set-turret! } if
|
||||
3 sensor? 4 sensor? & { 100 100 set-speed! get-turret set-turret! } if
|
||||
5 sensor? { 100 40 set-speed! } if
|
||||
}
|
||||
{
|
||||
( Behavior for when we can't shoot )
|
||||
|
||||
0 sensor? { 10 20 set-speed! } if
|
||||
1 sensor? { 10 10 set-speed! } if
|
||||
2 sensor? { 10 20 set-speed! } if
|
||||
3 sensor? { 70 50 set-speed! } if
|
||||
4 sensor? { 50 70 set-speed! } if
|
||||
3 sensor? 4 sensor? & { -100 20 set-speed! } if
|
||||
5 sensor? { 100 50 set-speed! } if
|
||||
}
|
||||
ifelse
|
|
@ -0,0 +1 @@
|
|||
50 0 8 1
|
|
@ -0,0 +1 @@
|
|||
30 0 50 0
|
|
@ -0,0 +1 @@
|
|||
50 0 10 0
|
|
@ -0,0 +1 @@
|
|||
100 315 100 1
|
|
@ -0,0 +1 @@
|
|||
100 45 100 1
|
|
@ -0,0 +1 @@
|
|||
60 180 180 0
|
|
@ -0,0 +1 @@
|
|||
Curtis Hash <chash@lanl.gov>
|
|
@ -0,0 +1 @@
|
|||
foobar
|
|
@ -0,0 +1,15 @@
|
|||
65 85 set-speed!
|
||||
|
||||
6 random 2 <= { 85 65 set-speed! } if
|
||||
|
||||
0 set-turret!
|
||||
2 sensor? { 80 10 set-speed! get-turret 30 + set-turret! } if
|
||||
3 sensor? { 10 80 set-speed! get-turret 30 - set-turret! } if
|
||||
4 sensor? { 90 90 set-speed! } if
|
||||
5 sensor? { 90 10 set-speed! get-turret 30 + set-turret! } if
|
||||
6 sensor? { 10 90 set-speed! get-turret 30 - set-turret! } if
|
||||
0 sensor? fire-ready? & { 90 90 set-speed! 0 set-turret! fire! } if
|
||||
1 sensor? { -100 -100 set-speed! } if
|
||||
|
||||
fire-ready? set-led!
|
||||
|
|
@ -0,0 +1 @@
|
|||
55 0 5 1
|
|
@ -0,0 +1 @@
|
|||
40 0 30 0
|
|
@ -0,0 +1 @@
|
|||
80 30 59 0
|
|
@ -0,0 +1 @@
|
|||
80 330 59 0
|
|
@ -0,0 +1 @@
|
|||
70 180 180 0
|
|
@ -0,0 +1 @@
|
|||
80 90 59 0
|
|
@ -0,0 +1 @@
|
|||
80 270 59 0
|
|
@ -0,0 +1 @@
|
|||
Paul Ferrell <pflarr@lanl.gov>
|
|
@ -0,0 +1 @@
|
|||
Pflanzarr
|
|
@ -0,0 +1,27 @@
|
|||
70 75 set-speed!
|
||||
0 set-turret!
|
||||
|
||||
10 random 1 > { 75 75 set-speed! } if
|
||||
|
||||
2 sensor? {
|
||||
85 70 set-speed!
|
||||
0 sensor? { get-turret 15 + set-turret! }
|
||||
{ get-turret 30 + set-turret! } ifelse
|
||||
} if
|
||||
3 sensor? {
|
||||
75 80 set-speed!
|
||||
0 sensor? { get-turret 15 - set-turret! }
|
||||
{ get-turret 30 - set-turret! } ifelse
|
||||
} if
|
||||
5 sensor? {
|
||||
7 sensor? { 70 30 set-speed! } if
|
||||
8 sensor? { 30 70 set-speed! } if
|
||||
0 sensor? { fire! } if
|
||||
6 sensor? fire-ready? & { 100 100 set-speed! } if
|
||||
} if
|
||||
4 sensor? { 100 100 set-speed! } if
|
||||
1 sensor? { -50 25 set-speed! } if
|
||||
|
||||
fire-ready? set-led!
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
50 0 45 1
|
|
@ -0,0 +1 @@
|
|||
30 0 180
|
|
@ -0,0 +1 @@
|
|||
100 40 60 1
|
|
@ -0,0 +1 @@
|
|||
100 320 60 1
|
|
@ -0,0 +1 @@
|
|||
80 180 160
|
|
@ -0,0 +1 @@
|
|||
100 0 0 1
|
|
@ -0,0 +1 @@
|
|||
100 0 0
|
|
@ -0,0 +1 @@
|
|||
75 75 30
|
|
@ -0,0 +1 @@
|
|||
75 285 30
|
|
@ -0,0 +1 @@
|
|||
Adam <adam.lloyd@gmail.com>
|
|
@ -0,0 +1 @@
|
|||
#7bdd82
|
|
@ -0,0 +1 @@
|
|||
BoomStick
|
|
@ -0,0 +1,56 @@
|
|||
0 sensor? { 0 0 mset fire! }if
|
||||
|
||||
0 9 mset
|
||||
|
||||
8 sensor? {-36 get-turret + set-turret! 1 9 mset} if
|
||||
4 sensor? { 36 get-turret + set-turret! 1 9 mset} if
|
||||
2 sensor? {-18 get-turret + set-turret! 1 9 mset} if
|
||||
1 sensor? { 18 get-turret + set-turret! 1 9 mset} if
|
||||
7 sensor? { 0 get-turret + set-turret! 1 9 mset} if
|
||||
|
||||
fire-ready?
|
||||
{
|
||||
6 sensor?
|
||||
{
|
||||
9 mget ! { 0 set-turret! } if
|
||||
100 100 set-speed! 5 0 mset
|
||||
}
|
||||
{
|
||||
5 sensor? { 100 -80 set-speed! 5 0 mset} if
|
||||
8 sensor? { -80 100 set-speed! 5 0 mset } if
|
||||
}
|
||||
ifelse
|
||||
}
|
||||
{
|
||||
6 sensor? { 1 set-led! -100 -100 set-speed! 3 0 mset } if
|
||||
5 sensor? { 1 set-led! -75 -100 set-speed! 3 0 mset } if
|
||||
8 sensor? { 1 set-led! -100 -75 set-speed! 3 0 mset } if
|
||||
}
|
||||
ifelse
|
||||
|
||||
|
||||
0 mget 0 =
|
||||
{
|
||||
0 set-led!
|
||||
0 set-turret!
|
||||
|
||||
1 mget 0 =
|
||||
{
|
||||
0 set-turret!
|
||||
3 random
|
||||
dup 0 = {90 90 set-speed! 20 random 1 mset } if
|
||||
dup 1 = {00 90 set-speed! 3 random 1 mset } if
|
||||
dup 2 = {90 00 set-speed! 3 random 1 mset } if
|
||||
}
|
||||
{
|
||||
1 mget 1 - 1 mset
|
||||
}
|
||||
ifelse
|
||||
}
|
||||
{
|
||||
0 mget 1 - 0 mset
|
||||
}
|
||||
ifelse
|
||||
|
||||
3 sensor? { -10 -10 set-speed! 1 0 mset } if
|
||||
|
|
@ -0,0 +1 @@
|
|||
50 0 2 1
|
|
@ -0,0 +1 @@
|
|||
100 18 18 1
|
|
@ -0,0 +1 @@
|
|||
100 -18 18 1
|
|
@ -0,0 +1 @@
|
|||
25 0 120 0
|
|
@ -0,0 +1 @@
|
|||
100 36 18 1
|
|
@ -0,0 +1 @@
|
|||
100 112 135 0
|
|
@ -0,0 +1 @@
|
|||
100 0 30 0
|
|
@ -0,0 +1 @@
|
|||
100 0 18 1
|
|
@ -0,0 +1 @@
|
|||
100 -112 135 0
|
|
@ -0,0 +1 @@
|
|||
100 -36 18 1
|
|
@ -0,0 +1 @@
|
|||
mr_combustible@hotmail.com
|
|
@ -0,0 +1 @@
|
|||
#FF6F00
|
|
@ -0,0 +1 @@
|
|||
Combustible
|
|
@ -0,0 +1,14 @@
|
|||
0 set-turret! ( Rotate turret )
|
||||
60 58 set-speed! ( Full speed! )
|
||||
0 sensor? { fire! } if ( Fire if turret sensor triggered )
|
||||
1 sensor? { 100 -150 set-speed! } if ( Turn if right sensor triggered )
|
||||
2 sensor? { -150 100 set-speed! } if ( Turn if left sensor triggered )
|
||||
8 sensor? { 90 0 set-speed! } if ( Turn if right/front sensor triggered )
|
||||
9 sensor? { 0 90 set-speed! } if ( Turn if left/front sensor triggered )
|
||||
3 sensor? { 150 150 set-speed! } if (Front doublespeed)
|
||||
4 sensor? { 150 150 set-speed! } if ( run away! )
|
||||
|
||||
7 sensor? { -150 -150 set-speed! } if (Front collision)
|
||||
|
||||
fire-ready? {}{ 5 sensor? {-30 -60 set-speed! } if } ifelse
|
||||
fire-ready? {}{ 6 sensor? {-60 -30 set-speed! } if } ifelse
|
|
@ -0,0 +1 @@
|
|||
50 0 2 0
|
|
@ -0,0 +1 @@
|
|||
100 108 130 0
|
|
@ -0,0 +1 @@
|
|||
100 252 130 0
|
|
@ -0,0 +1 @@
|
|||
100 0 2 0
|
|
@ -0,0 +1 @@
|
|||
90 180 90 0
|
|
@ -0,0 +1 @@
|
|||
55 90 180 0
|
|
@ -0,0 +1 @@
|
|||
55 270 180 0
|
|
@ -0,0 +1 @@
|
|||
35 0 180 0
|
|
@ -0,0 +1 @@
|
|||
100 34 37 0
|
|
@ -0,0 +1 @@
|
|||
100 326 37 0
|
|
@ -0,0 +1,2 @@
|
|||
50 0 0 1
|
||||
70 0 50 0
|
|
@ -0,0 +1 @@
|
|||
Geoff
|
|
@ -0,0 +1 @@
|
|||
#FFFFFF
|
|
@ -0,0 +1 @@
|
|||
clumsy
|
|
@ -0,0 +1,50 @@
|
|||
0 sensor?{
|
||||
get-turret 0 = { 1 sensor?{ fire! } if } if
|
||||
|
||||
get-turret 17 = { 2 sensor?{ fire! } if } if
|
||||
get-turret 34 = { 3 sensor?{ fire! } if } if
|
||||
get-turret 51 = { 4 sensor?{ fire! } if } if
|
||||
|
||||
get-turret -17 = { 5 sensor?{ fire! } if } if
|
||||
get-turret -34 = { 6 sensor?{ fire! } if } if
|
||||
get-turret -51 = { 7 sensor?{ fire! } if } if
|
||||
}if (0)
|
||||
fire-ready?{ 0 set-led! }{ 1 set-led! } ifelse
|
||||
|
||||
1 sensor?{ 0 set-turret! }{
|
||||
2 sensor?{ 17 set-turret! }{
|
||||
3 sensor?{ 34 set-turret! }{
|
||||
4 sensor?{ 51 set-turret! }{
|
||||
5 sensor?{ -17 set-turret! }{
|
||||
6 sensor?{ -34 set-turret! }{
|
||||
7 sensor?{ -51 set-turret! }{
|
||||
0 set-turret!
|
||||
}ifelse
|
||||
}ifelse
|
||||
}ifelse
|
||||
}ifelse
|
||||
}ifelse
|
||||
}ifelse
|
||||
}ifelse
|
||||
|
||||
get-turret 0 = { 2 sensor?{ 17 set-turret! }{ 5 sensor?{ -17 set-turret! } if (5) } ifelse (2) } if (0t)
|
||||
get-turret 17 = { 1 sensor?{ 0 set-turret! }{ 3 sensor?{ 34 set-turret! } if (3) } ifelse (1) } if (17t)
|
||||
get-turret 34 = { 2 sensor?{ 17 set-turret! }{ 4 sensor?{ 51 set-turret! } if (4) } ifelse (2) } if (34t)
|
||||
get-turret 51 = { 34 set-turret! } if (51t)
|
||||
|
||||
get-turret -17 = { 1 sensor?{ 0 set-turret! }{ 6 sensor?{ -34 set-turret! } if (6) } ifelse (1) } if (-17t)
|
||||
get-turret -34 = { 5 sensor?{ -17 set-turret! }{ 7 sensor?{ -51 set-turret! } if (7) } ifelse (5) } if (-34t)
|
||||
get-turret -51 = { -34 set-turret! } if (51t)
|
||||
|
||||
9 mget 55 = {}{ 0 set-turret! 55 9 mset} ifelse
|
||||
|
||||
1 sensor?{ 100 1 mset 100 2 mset }{
|
||||
2 sensor?{ 100 1 mset -100 2 mset }{
|
||||
5 sensor?{ -100 1 mset 100 2 mset }{
|
||||
100 1 mset 100 2 mset
|
||||
} ifelse (5)
|
||||
} ifelse (2)
|
||||
} ifelse (1)
|
||||
|
||||
8 sensor?{ 100 1 mset 100 2 mset } if
|
||||
1 mget 2 mget set-speed!
|
|
@ -0,0 +1 @@
|
|||
50 0 359 0
|
|
@ -0,0 +1 @@
|
|||
100 0 1 0
|
|
@ -0,0 +1 @@
|
|||
100 17 1 0
|
|
@ -0,0 +1 @@
|
|||
100 34 1 0
|
|
@ -0,0 +1 @@
|
|||
100 51 1 0
|
|
@ -0,0 +1 @@
|
|||
100 -17 1 0
|
|
@ -0,0 +1 @@
|
|||
100 -34 1 0
|
|
@ -0,0 +1 @@
|
|||
100 -51 1 0
|
|
@ -0,0 +1 @@
|
|||
75 180 180 0
|
|
@ -0,0 +1 @@
|
|||
90 180 180 0
|
|
@ -0,0 +1 @@
|
|||
F
|
|
@ -0,0 +1 @@
|
|||
#FF0000
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue