Release v3.0
This commit is contained in:
20
OGP1718-Worms/programs/program_example.txt
Executable file
20
OGP1718-Worms/programs/program_example.txt
Executable file
@@ -0,0 +1,20 @@
|
||||
def controlled_move:
|
||||
if getap self > 100.0:
|
||||
{ jump;
|
||||
print getx self;
|
||||
print gety self; }
|
||||
else move;
|
||||
|
||||
max_distance := 10.0;
|
||||
while true: {
|
||||
w := searchobj 0.0;
|
||||
if isworm w: {
|
||||
if sameteam w:
|
||||
invoke controlled_move;
|
||||
else if distance w < max_distance:
|
||||
fire;
|
||||
else
|
||||
{ turn d;
|
||||
max_distance := max_distance + 0.1; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user