-
Notifications
You must be signed in to change notification settings - Fork 0
/
HumanPlayer.h
45 lines (33 loc) · 1.95 KB
/
HumanPlayer.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
36
37
38
39
40
41
42
43
44
45
#pragma once
#include "Player.h"
namespace Citadel
{
class HumanPlayer : public Player
{
public:
HumanPlayer(const std::string& name);
#pragma region PURE VIRTUAL METHODS
// Returns character picked to play
virtual Character PickCharacter(const std::set<Character>& remainingCharacters, const std::set<Character>& faceupCharacters) override;
// Returns action to be taken
virtual PlayerAction ChooseAction(const std::vector<PlayerAction>& availableActions) override;
// Watch proposed district cards and return selected card
virtual District WatchAndChooseDistrictCard(const std::vector<District>& districts) override;
// Returns district card id player wants to build
virtual std::vector<District> ChooseDistrictCardsToBuild(const size_t authorizedBuilds) override;
// Returns character targeted by assassination or theft
virtual Character ChooseCharacterTarget(const std::set<Character>& opponents) override;
// Returns opponent player id, current player wants to target
virtual int ChoosePlayerTarget(const std::vector<const Player*>& opponents) override;
// Returns a pair containing player id (self district destroy is tolerated) as key and destroyed district as value
virtual std::pair<int, District> ChoosePlayerDistrictTarget(const std::vector<const Player*>& players) override;
// Returns a choice specific to Magician character
virtual MagicianChoice MagicianDecision(const std::vector<const Player*>& opponents) override;
// Returns discarded districts to be replaced by equivalent number of cards from district deck
virtual std::vector<District> ChooseDistrictsCardsToSwap() override;
#pragma endregion
private:
std::vector<District> SelectMultipleDistricts(const std::vector<District>& container);
void DisplayDistrictDetails(const District district, const size_t index) const;
};
}