You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.8 KiB
41 lines
1.8 KiB
#include "storm/storage/prism/Player.h"
|
|
|
|
namespace storm {
|
|
namespace prism {
|
|
Player::Player(std::string const& playerName, std::map<std::string, uint_fast64_t> const& controlledModules, std::map<std::string, uint_fast64_t> const& controlledCommands, std::string const& filename, uint_fast64_t lineNumber) : LocatedInformation(filename, lineNumber), playerName(playerName), controlledModules(controlledModules), controlledCommands(controlledCommands) {
|
|
// Nothing to do here.
|
|
}
|
|
|
|
std::string const& Player::getName() const {
|
|
return this->playerName;
|
|
}
|
|
|
|
std::map<std::string, uint_fast64_t> const& Player::getModules() const {
|
|
return this->controlledModules;
|
|
}
|
|
|
|
std::map<std::string, uint_fast64_t> const& Player::getCommands() const {
|
|
return this->controlledCommands;
|
|
}
|
|
|
|
std::ostream& operator<<(std::ostream& stream, Player const& player) {
|
|
stream << "player";
|
|
if (player.getName() != "") {
|
|
stream << " " << player.getName();
|
|
}
|
|
stream << std::endl;
|
|
//for (auto const& module : player.getModules()) {
|
|
// stream << module.getName() << " ";
|
|
// //&module != (player.getModules()).back ? std::cout << "," : std::cout << std::endl;
|
|
//}
|
|
//stream << std::endl;
|
|
//for (auto const& command : player.getCommands()) {
|
|
// stream << "[" << command.getActionName() << "] ";
|
|
// //&command != (player.getCommands()).back ? std::cout << "," : std::cout << std::endl;
|
|
//}
|
|
//stream << std::endl;
|
|
stream << "endplayer" << std::endl;
|
|
return stream;
|
|
}
|
|
} // namespace prism
|
|
} // namespace storm
|