6Player::Player(std::string
const& playerName, std::unordered_set<std::string>
const& controlledModules,
7 std::unordered_set<std::string>
const& controlledActions, std::string
const& filename, uint_fast32_t lineNumber)
8 :
LocatedInformation(filename, lineNumber), playerName(playerName), controlledModules(controlledModules), controlledActions(controlledActions) {
13 return this->playerName;
17 return this->controlledModules;
21 return this->controlledActions;
27 stream <<
" " << player.
getName();
29 bool firstElement =
true;
30 for (
auto const& module : player.
getModules()) {
36 stream <<
"\n\t" << module;
38 for (
auto const& action : player.
getActions()) {
44 stream <<
"\n\t[" << action <<
"]";
46 stream <<
"\nendplayer\n";
std::unordered_set< std::string > const & getModules() const
Retrieves all controlled Modules of the player.
std::unordered_set< std::string > const & getActions() const
Retrieves all controlled Actions of the player.
std::string const & getName() const
Retrieves the name of the player.
Player(std::string const &playerName, std::unordered_set< std::string > const &controlledModules, std::unordered_set< std::string > const &controlledActions, std::string const &filename="", uint_fast32_t lineNumber=0)
Creates a player with the given name, controlled modules and actions.
std::ostream & operator<<(std::ostream &stream, Assignment const &assignment)