parent
cf1a147078
commit
1da480b331
2 changed files with 18 additions and 0 deletions
@ -0,0 +1,10 @@ |
||||
#include "ai.h" |
||||
#include "engine.h" |
||||
|
||||
const char moves[] = {'w', 'a', 's', 'd'}; |
||||
|
||||
int ai_move(struct gamestate *g) |
||||
{ |
||||
if (g->opts->interactive) usleep(50000); |
||||
return moves[rand() % 4]; |
||||
} |
Loading…
Reference in new issue