blob: db2cf4f2d67eff7e99c4664e97869584bd46c977 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include "rand_ai.hpp"
RandAI::RandAI(Game *g)
{
game = g;
}
Direction RandAI::move()
{
Direction directions[4] = {DIRECTION_LEFT, DIRECTION_RIGHT,
DIRECTION_DOWN, DIRECTION_UP};
return directions[rand() % 4];
}
|