Add the ai files that were forgotten in previous commit
This commit is contained in:
parent
cf1a147078
commit
1da480b331
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];
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user