Add the ai files that were forgotten in previous commit
This commit is contained in:
10
src/ai.c
Normal file
10
src/ai.c
Normal file
@@ -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];
|
||||
}
|
Reference in New Issue
Block a user