Get rid of random blockgenerator in favor of a linear time one. Changed a sleep in ai to use gfx_sleep

This commit is contained in:
Tiehuis
2015-02-25 23:54:13 +13:00
parent 05f2713179
commit dc9adea7b5
3 changed files with 16 additions and 18 deletions
+2 -1
View File
@@ -1,10 +1,11 @@
#include "ai.h"
#include "engine.h"
#include "gfx.h"
const char moves[] = {'w', 'a', 's', 'd'};
int ai_move(struct gamestate *g)
{
if (g->opts->interactive) usleep(50000);
if (g->opts->interactive) gfx_sleep(50);
return moves[rand() % 4];
}