![]() |
Cluedo Solver v1.0
Cluedo game solver making deductions.
|
The player of a game. More...
#include <Player.hpp>
Public Member Functions | |
Player (std::string const &name, std::size_t card_count) | |
std::string const & | name () const |
std::size_t | card_count () const |
std::optional< bool > | has_card (Card card) const |
void | add_in_hand_card (Card card) |
void | add_not_in_hand_card (Card card) |
void | add_possible_cards (CardSet const &set) |
The player of a game.
This class stores the information on a player by using two sets:
When new information is added to a player then we will try to infer new information on his cards.
|
inlineexplicit |
Constructs a player.
name | The name of the player. |
card_count | The number of cards held by the player. |
|
inline |
Learns that the player has a card.
card | The card which the player has. |
|
inline |
Learns that the player doesn't have a card.
card | The card which the player doesn't have. |
|
inline |
Learns that the player has one of the card specified in set.
set | The set of cards of which the player will have one. |
|
inline |
Returns the number of cards held by the player.
|
inline |
Checks if a player has a card.
true
if the player has the card, false
if he doesn't and nothing if we don't know.
|
inline |
Returns the name of the player.