summaryrefslogtreecommitdiff
path: root/ai_rand.cpp
blob: c4df24e5414d71d1f07e1f77692f9c735050ac63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
#include <cassert>
#include <climits>
#include "ai_rand.h"
#include "util.h"

using namespace std;


int RAND::calcMove(Board &bd, uint8_t myclr) {
	(void)myclr;
	assert(bd.bag.totalLeft() > 0);

	const vector<int> &moves = bd.getEdgeCells();

	assert(moves.size() > 0);
	return moves[random() % moves.size()];
}