Add the ai files that were forgotten in previous commit

master
Tiehuis 9 years ago
parent cf1a147078
commit 1da480b331
  1. 10
      src/ai.c
  2. 8
      src/ai.h

@ -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];
}

@ -0,0 +1,8 @@
#ifndef AI_H
#define AI_H
#include "engine.h"
int ai_move(struct gamestate *g);
#endif
Loading…
Cancel
Save