Category : A Collection of Games for DOS and Windows
Archive   : CROBLIB.ZIP
Filename : FOO.R

 
Output of file : FOO.R contained in archive : CROBLIB.ZIP
/* */
/* FOO : programmed by OBI-ONE */
/* */

int drv_dir; /* drive direction */
int scn_dir; /* scan direction */
int range; /* range to oponent */
int found; /* oponet found ? */

main()
{
drv_dir = rand( 360 ); /* initialize */
scn_dir = 0;
found = 0;

while ( 1 ) { /* main loop */

/* drive at full speed. */
/* when close to wall, turn around at random. */

drive( drv_dir, 100 );
if ( ( x = loc_x() ) < 150 )
drv_dir = rand( 90 );
else if ( x > 850 )
drv_dir = rand( 90 ) + 180;
if ( ( y = loc_y() ) < 150 )
drv_dir = rand( 90 ) + 90;
else if ( y > 850 )
drv_dir = rand( 90 ) + 270;

/* scan every 20 degrees resolution. */
/* if found oponent, cannon it. */

if ( range = scan( scn_dir, 10 ) ) {
found = 1;
cannon( scn_dir, range );
}
else if ( found ) {
found = 0;
scn_dir -= 30;
}
else
scn_dir += 10;

} /* end of main loop */
}


  3 Responses to “Category : A Collection of Games for DOS and Windows
Archive   : CROBLIB.ZIP
Filename : FOO.R

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/