PlayerSet PlayerMapHelper::GetAllSet() const
{
	PlayerSet ret;
	//if (Player::GetSharedState().amountChanged)
	{
		for (const auto& pair : m_playerMap)
		{
			ret.insert(pair.second);
		}
		//Player::GetSharedState().amountChanged = false;
	}
	return ret;
}
PlayerSet PlayerMapHelper::GetByTeamSet(char team) const
{
	PlayerSet ret;
	for (const auto& pair : m_playerMap)
	{
		Player* pl = pair.second;
		if (pl->GetTeamTag() == team)
		{
			ret.insert(pl);
		}
	}
	return ret;
}
PlayerSet PlayerMapHelper::GetByStatusSet(PlayerState::IngameStatus status) const
{
	PlayerSet ret;
	//if (Player::GetSharedState().statusChanged)
	{
		for (const auto& pair : m_playerMap)
		{
			Player* pl = pair.second;
			if (pl->GetState().GetStatus() == status)
			{
				ret.insert(pl);
			}
		}
		//Player::GetSharedState().statusChanged = false;
	}
	return ret;
}
PlayerSet PlayerMapHelper::GetByPhaseSet(PlayerState::GamePhase phase) const
{
	PlayerSet ret;
	//if (Player::GetSharedState().phaseChanged)
	{
		for (const auto& pair : m_playerMap)
		{
			Player* pl = pair.second;
			if (pl->GetState().GetPhase() == phase)
			{
				ret.insert(pl);
			}
		}
		//Player::GetSharedState().phaseChanged = false;
	}
	return ret;
}