-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathBlindBot.cc
More file actions
22 lines (18 loc) · 803 Bytes
/
BlindBot.cc
File metadata and controls
22 lines (18 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <cassert>
#include <cstdlib>
#include "Hanabi.h"
#include "BlindBot.h"
using namespace Hanabi;
BlindBot::BlindBot(int, int, int) { }
void BlindBot::pleaseObserveBeforeMove(const Server &) { }
void BlindBot::pleaseObserveBeforeDiscard(const Server &, int, int) { }
void BlindBot::pleaseObserveBeforePlay(const Server &, int, int) { }
void BlindBot::pleaseObserveColorHint(const Server &, int, int, Color, CardIndices) { }
void BlindBot::pleaseObserveValueHint(const Server &, int, int, Value, CardIndices) { }
void BlindBot::pleaseObserveAfterMove(const Server &) { }
void BlindBot::pleaseMakeMove(Server &server)
{
/* Just try to play a random card from my hand. */
int random_index = std::rand() % server.sizeOfHandOfPlayer(server.whoAmI());
server.pleasePlay(random_index);
}