What is Atak-avv? |
Atak-avv is a game. You write perl scripts to control vitual bots.
You then connect to a server and watch as your bot fights bots
created by other people.
|
So how does a perl script control a bot? |
You will call various functions to make your bot do things
or to find out things about what's going on around you.
Suppose we have a function called: ShootLaser() which
took a direction in degrees and, well, shot a laser in
that direction. Suppose we also had a function called:
RadarPing() which took a direction, sent a radar ping
in that direction, and returned true if it bounced back, false if
it didn't. Given these functions we could write the following code
to search for an enemy bot and shoot it:
$i = 0;
while(1)
{
if( RadarPing($i) )
{
ShootLaser($i);
}
if( $i < 360 )
{
$i = $i + 1;
}
else
{
$i = 0;
}
}
|
My question isn't answered here. |
Email us and we'll do our best to answer it. If we think it's a question
other people are likely to have too, we'll put it, along with the answer,
on this page. Find out how to contact us on the
contact page.
|
|