-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.h
35 lines (30 loc) · 948 Bytes
/
game.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef GAME_H
#define GAME_H
#include <random>
#include <vector>
#include "card.h"
#include "card_set.h"
#include "pile.h"
#include "player.h"
class Game {
public:
Game(int num_players);
void PlayGame(const vector<const Strategy*>& strategies);
void PlayGame(const vector<const Strategy*>& strategies, std::mt19937& g);
void FinishGame(const vector<const Strategy*>& strategies, std::mt19937& g);
bool PlayTurn(const vector<const Strategy*>& strategies, std::mt19937& g);
bool FinishTurn(const vector<const Strategy*>& strategies, std::mt19937& g);
bool IsOver();
void MakePiles(const std::vector<CardName>& kingdom, int num_players);
void ShowPiles() const;
Pile* FindPile(CardName card_name);
int NumEmptyPiles() const;
void HandleGameOver();
std::vector<Card> CardsAtopPiles() const;
std::vector<Player> players;
int turn_number;
int player_on_turn;
std::vector<Pile> piles;
CardSet trash;
};
#endif