home *** CD-ROM | disk | FTP | other *** search
- /*
- * An example of a simple player. As his name suggests, Mr. Right just tries
- * to turn right if his way is blocked, and turns left if there's something
- * in the way. As you can see, writing a simple player using the manager code
- * is trivial.
- */
- #include "cycles.h"
-
- char player_name[] = "Mr. Right";
-
- strategy_init() {}
- strategy_finish() {}
-
- strategy()
- {
- long x,y,dir;
-
- GetInfo(&x,&y,&dir);
- if (!Look(dir))
- return(dir);
- if (!Look(TURN_RIGHT(dir)))
- return(TURN_RIGHT(dir));
- return(TURN_LEFT(dir));
- }
-