\hypertarget{classPlayerTrackerClass}{\section{\-Player\-Tracker\-Class \-Class \-Reference}
\label{classPlayerTrackerClass}\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}}
}


{\ttfamily \#include $<$\-Player\-Tracker.\-h$>$}

\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classPlayerTrackerClass_a83d0e0cdacdf9920df011b9928d3358c}{\-Player\-Tracker\-Class} ()
\item 
void \hyperlink{classPlayerTrackerClass_a4422d6224d7ceea4dc7eff65baf24639}{on\-Begin} ()
\item 
void \hyperlink{classPlayerTrackerClass_a827010e19bef18c967142567e64a5c59}{update} ()
\item 
void \hyperlink{classPlayerTrackerClass_ad88c08703ff6108bf048cbebb43235ec}{on\-Player\-Left} (\hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player} player)
\item 
void \hyperlink{classPlayerTrackerClass_a9a4b97283617cd935f4dbe6b22688db9}{on\-Discover} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\item 
void \hyperlink{classPlayerTrackerClass_a07c523e9b576ad07f72a81b6861acc82}{on\-Morph\-Renegade} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit, \hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player} previous\-Player, \hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} previous\-Type)
\item 
void \hyperlink{classPlayerTrackerClass_ae84ceefe6a0bbd8823faaac57313a9da}{update\-Players} ()
\item 
bool \hyperlink{classPlayerTrackerClass_a7d1aae9496a6da69b3ce62b5598f16f3}{is\-Enemy\-Race} (\hyperlink{classBWAPI_1_1Race}{\-B\-W\-A\-P\-I\-::\-Race} race)
\item 
std\-::set$<$ \hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player} $>$ \hyperlink{classPlayerTrackerClass_a2ad35678d72072bf3dedb1660917e96b}{get\-Enemies} (\hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player} player=\hyperlink{namespaceBWAPI_a734117433f2919ca501804ebe0050afb}{\-B\-W\-A\-P\-I\-::\-Broodwar}-\/$>$self()) const 
\item 
std\-::set$<$ \hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player} $>$ \hyperlink{classPlayerTrackerClass_a64fe2f480b65ace9d5c523b006663290}{get\-Allies} (\hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player} player=\hyperlink{namespaceBWAPI_a734117433f2919ca501804ebe0050afb}{\-B\-W\-A\-P\-I\-::\-Broodwar}-\/$>$self()) const 
\item 
bool \hyperlink{classPlayerTrackerClass_ade207cef8af1042816e8490bc4d93071}{player\-Has\-Reseached} (\hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player} player, \hyperlink{classBWAPI_1_1TechType}{\-B\-W\-A\-P\-I\-::\-Tech\-Type} tech)
\item 
bool \hyperlink{classPlayerTrackerClass_ae06ae3cc230cafcba668a9b927e4ccca}{enemy\-Has\-Reseached} (\hyperlink{classBWAPI_1_1TechType}{\-B\-W\-A\-P\-I\-::\-Tech\-Type} tech)
\item 
int \hyperlink{classPlayerTrackerClass_a3c1c2fa192a450f3b03a52bbb2d685d1}{player\-Unit\-Count} (\hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} unit, \hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player} player=\hyperlink{namespaceBWAPI_a734117433f2919ca501804ebe0050afb}{\-B\-W\-A\-P\-I\-::\-Broodwar}-\/$>$self()) const 
\item 
int \hyperlink{classPlayerTrackerClass_a7bdf65a0658d16d5d4a2da2bc2d5a262}{enemy\-Unit\-Count} (\hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} unit, \hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player} player=\hyperlink{namespaceBWAPI_a734117433f2919ca501804ebe0050afb}{\-B\-W\-A\-P\-I\-::\-Broodwar}-\/$>$self()) const 
\item 
const std\-::vector$<$ \hyperlink{classUnitGroup}{\-Unit\-Group} $>$ \& \hyperlink{classPlayerTrackerClass_ab57bc78e16742b483a0db5240c69b39a}{get\-Enemy\-Clusters} ()
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::set$<$ \hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player} $>$ \hyperlink{classPlayerTrackerClass_a11940f7cdbe3d85b44e1a93390ce48ea}{m\-Enemies}
\item 
std\-::set$<$ \hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player} $>$ \hyperlink{classPlayerTrackerClass_a8ebce68ed3b3183fd501cd39cc2ac027}{m\-Allies}
\item 
std\-::map$<$ \hyperlink{classBWAPI_1_1Race}{\-B\-W\-A\-P\-I\-::\-Race}, bool $>$ \hyperlink{classPlayerTrackerClass_af97413b853a229155fb3a87c6729626d}{m\-Enemy\-Race\-Info}
\item 
std\-::map$<$ \hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player}, bool $>$ \hyperlink{classPlayerTrackerClass_a96bef3318dff901311f7c4e33b907640}{m\-Player\-Has\-Offensive\-Units\-Need\-Detection}
\item 
std\-::map$<$ \hyperlink{Interface_8h_af5e942c6e6113009bb539d45bebff901}{\-Player}, std\-::set\*
$<$ \hyperlink{classBWAPI_1_1TechType}{\-B\-W\-A\-P\-I\-::\-Tech\-Type} $>$ $>$ \hyperlink{classPlayerTrackerClass_a8672dbd760eacefdd0a255377949b28f}{m\-Researched}
\item 
std\-::vector$<$ \hyperlink{classUnitGroup}{\-Unit\-Group} $>$ \hyperlink{classPlayerTrackerClass_af638f01b52d95b6fe576cbec0f35c9d5}{m\-Enemy\-Clusters}
\item 
bool \hyperlink{classPlayerTrackerClass_a269081382197a8c6e49f373430c2e6fd}{m\-Show\-Debug\-Info}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}


\-Definition at line 9 of file \-Player\-Tracker.\-h.



\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classPlayerTrackerClass_a83d0e0cdacdf9920df011b9928d3358c}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}}
\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{\-Player\-Tracker\-Class}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Player\-Tracker\-Class\-::\-Player\-Tracker\-Class} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classPlayerTrackerClass_a83d0e0cdacdf9920df011b9928d3358c}


\-Definition at line 12 of file \-Player\-Tracker.\-h.


\begin{DoxyCode}
{}
\end{DoxyCode}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classPlayerTrackerClass_ae06ae3cc230cafcba668a9b927e4ccca}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!enemy\-Has\-Reseached@{enemy\-Has\-Reseached}}
\index{enemy\-Has\-Reseached@{enemy\-Has\-Reseached}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{enemy\-Has\-Reseached}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Player\-Tracker\-Class\-::enemy\-Has\-Reseached} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Tech\-Type}}]{tech}
\end{DoxyParamCaption}
)}}\label{classPlayerTrackerClass_ae06ae3cc230cafcba668a9b927e4ccca}


\-Definition at line 131 of file \-Player\-Tracker.\-cpp.



\-References get\-Enemies(), and player\-Has\-Reseached().


\begin{DoxyCode}
{
        for each(Player enemy in getEnemies())
        {
                if(playerHasReseached(enemy, tech))
                        return true;
        }

        return false;
}
\end{DoxyCode}


\-Here is the call graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_ae06ae3cc230cafcba668a9b927e4ccca_cgraph}
\end{center}
\end{figure}


\hypertarget{classPlayerTrackerClass_a7bdf65a0658d16d5d4a2da2bc2d5a262}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!enemy\-Unit\-Count@{enemy\-Unit\-Count}}
\index{enemy\-Unit\-Count@{enemy\-Unit\-Count}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{enemy\-Unit\-Count}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Player\-Tracker\-Class\-::enemy\-Unit\-Count} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type}}]{unit, }
\item[{{\bf \-Player}}]{player = {\ttfamily {\bf \-B\-W\-A\-P\-I\-::\-Broodwar}-\/$>$self()}}
\end{DoxyParamCaption}
) const}}\label{classPlayerTrackerClass_a7bdf65a0658d16d5d4a2da2bc2d5a262}


\-Definition at line 177 of file \-Player\-Tracker.\-cpp.



\-References get\-Enemies(), and player\-Unit\-Count().


\begin{DoxyCode}
{
        int count = 0;
        for each(Player enemy in getEnemies(player))
        {
                count += playerUnitCount(unit, enemy);
        }

        return count;
}\end{DoxyCode}


\-Here is the call graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_a7bdf65a0658d16d5d4a2da2bc2d5a262_cgraph}
\end{center}
\end{figure}


\hypertarget{classPlayerTrackerClass_a64fe2f480b65ace9d5c523b006663290}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!get\-Allies@{get\-Allies}}
\index{get\-Allies@{get\-Allies}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{get\-Allies}]{\setlength{\rightskip}{0pt plus 5cm}std\-::set$<$ {\bf \-Player} $>$ {\bf \-Player\-Tracker\-Class\-::get\-Allies} (
\begin{DoxyParamCaption}
\item[{{\bf \-Player}}]{player = {\ttfamily {\bf \-B\-W\-A\-P\-I\-::\-Broodwar}-\/$>$self()}}
\end{DoxyParamCaption}
) const}}\label{classPlayerTrackerClass_a64fe2f480b65ace9d5c523b006663290}


\-Definition at line 157 of file \-Player\-Tracker.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-B\-W\-A\-P\-I\-::\-Player\-::is\-Ally(), and m\-Allies.



\-Referenced by update().


\begin{DoxyCode}
{
        if(player == BWAPI::Broodwar->self())
                return mAllies;

        std::set<Player> allies;
        for each(Player ally in BWAPI::Broodwar->getPlayers())
        {
                if(player->isAlly(ally))
                        allies.insert(ally);
        }

        return allies;
}
\end{DoxyCode}


\-Here is the call graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_a64fe2f480b65ace9d5c523b006663290_cgraph}
\end{center}
\end{figure}




\-Here is the caller graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_a64fe2f480b65ace9d5c523b006663290_icgraph}
\end{center}
\end{figure}


\hypertarget{classPlayerTrackerClass_a2ad35678d72072bf3dedb1660917e96b}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!get\-Enemies@{get\-Enemies}}
\index{get\-Enemies@{get\-Enemies}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{get\-Enemies}]{\setlength{\rightskip}{0pt plus 5cm}std\-::set$<$ {\bf \-Player} $>$ {\bf \-Player\-Tracker\-Class\-::get\-Enemies} (
\begin{DoxyParamCaption}
\item[{{\bf \-Player}}]{player = {\ttfamily {\bf \-B\-W\-A\-P\-I\-::\-Broodwar}-\/$>$self()}}
\end{DoxyParamCaption}
) const}}\label{classPlayerTrackerClass_a2ad35678d72072bf3dedb1660917e96b}


\-Definition at line 142 of file \-Player\-Tracker.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-B\-W\-A\-P\-I\-::\-Player\-::is\-Enemy(), and m\-Enemies.



\-Referenced by enemy\-Has\-Reseached(), enemy\-Unit\-Count(), and update().


\begin{DoxyCode}
{
        if(player == BWAPI::Broodwar->self())
                return mEnemies;

        std::set<Player> enemies;
        for each(Player enemy in BWAPI::Broodwar->getPlayers())
        {
                if(player->isEnemy(enemy))
                        enemies.insert(enemy);
        }

        return enemies;
}
\end{DoxyCode}


\-Here is the call graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_a2ad35678d72072bf3dedb1660917e96b_cgraph}
\end{center}
\end{figure}




\-Here is the caller graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_a2ad35678d72072bf3dedb1660917e96b_icgraph}
\end{center}
\end{figure}


\hypertarget{classPlayerTrackerClass_ab57bc78e16742b483a0db5240c69b39a}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!get\-Enemy\-Clusters@{get\-Enemy\-Clusters}}
\index{get\-Enemy\-Clusters@{get\-Enemy\-Clusters}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{get\-Enemy\-Clusters}]{\setlength{\rightskip}{0pt plus 5cm}const std\-::vector$<${\bf \-Unit\-Group}$>$\& {\bf \-Player\-Tracker\-Class\-::get\-Enemy\-Clusters} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classPlayerTrackerClass_ab57bc78e16742b483a0db5240c69b39a}


\-Definition at line 34 of file \-Player\-Tracker.\-h.



\-References m\-Enemy\-Clusters.


\begin{DoxyCode}
{ return mEnemyClusters; }
\end{DoxyCode}
\hypertarget{classPlayerTrackerClass_a7d1aae9496a6da69b3ce62b5598f16f3}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!is\-Enemy\-Race@{is\-Enemy\-Race}}
\index{is\-Enemy\-Race@{is\-Enemy\-Race}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{is\-Enemy\-Race}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Player\-Tracker\-Class\-::is\-Enemy\-Race} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Race}}]{race}
\end{DoxyParamCaption}
)}}\label{classPlayerTrackerClass_a7d1aae9496a6da69b3ce62b5598f16f3}


\-Definition at line 121 of file \-Player\-Tracker.\-cpp.



\-References m\-Enemy\-Race\-Info.


\begin{DoxyCode}
{
        return mEnemyRaceInfo[race];
}
\end{DoxyCode}
\hypertarget{classPlayerTrackerClass_a4422d6224d7ceea4dc7eff65baf24639}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!on\-Begin@{on\-Begin}}
\index{on\-Begin@{on\-Begin}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{on\-Begin}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Player\-Tracker\-Class\-::on\-Begin} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classPlayerTrackerClass_a4422d6224d7ceea4dc7eff65baf24639}


\-Definition at line 9 of file \-Player\-Tracker.\-cpp.



\-References update\-Players().


\begin{DoxyCode}
{
        updatePlayers();
}
\end{DoxyCode}


\-Here is the call graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_a4422d6224d7ceea4dc7eff65baf24639_cgraph}
\end{center}
\end{figure}


\hypertarget{classPlayerTrackerClass_a9a4b97283617cd935f4dbe6b22688db9}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!on\-Discover@{on\-Discover}}
\index{on\-Discover@{on\-Discover}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{on\-Discover}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Player\-Tracker\-Class\-::on\-Discover} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)}}\label{classPlayerTrackerClass_a9a4b97283617cd935f4dbe6b22688db9}


\-Definition at line 84 of file \-Player\-Tracker.\-cpp.



\-References m\-Researched, \-B\-W\-A\-P\-I\-::\-Tech\-Types\-::\-Spider\-\_\-\-Mines, \-B\-W\-A\-P\-I\-::\-Tech\-Types\-::\-Tank\-\_\-\-Siege\-\_\-\-Mode, \-B\-W\-A\-P\-I\-::\-Unit\-Types\-::\-Terran\-\_\-\-Siege\-\_\-\-Tank\-\_\-\-Siege\-\_\-\-Mode, and \-B\-W\-A\-P\-I\-::\-Unit\-Types\-::\-Terran\-\_\-\-Vulture\-\_\-\-Spider\-\_\-\-Mine.



\-Referenced by on\-Morph\-Renegade().


\begin{DoxyCode}
{
        if(unit->getType() == BWAPI::UnitTypes::Terran_Siege_Tank_Siege_Mode)
                mResearched[unit->getPlayer()].insert(
      BWAPI::TechTypes::Tank_Siege_Mode);
        else if(unit->getType() == BWAPI::UnitTypes::Terran_Vulture_Spider_Mine
      )
                mResearched[unit->getPlayer()].insert(
      BWAPI::TechTypes::Spider_Mines);
}
\end{DoxyCode}


\-Here is the caller graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_a9a4b97283617cd935f4dbe6b22688db9_icgraph}
\end{center}
\end{figure}


\hypertarget{classPlayerTrackerClass_a07c523e9b576ad07f72a81b6861acc82}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!on\-Morph\-Renegade@{on\-Morph\-Renegade}}
\index{on\-Morph\-Renegade@{on\-Morph\-Renegade}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{on\-Morph\-Renegade}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Player\-Tracker\-Class\-::on\-Morph\-Renegade} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit, }
\item[{{\bf \-Player}}]{previous\-Player, }
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type}}]{previous\-Type}
\end{DoxyParamCaption}
)}}\label{classPlayerTrackerClass_a07c523e9b576ad07f72a81b6861acc82}


\-Definition at line 92 of file \-Player\-Tracker.\-cpp.



\-References on\-Discover().


\begin{DoxyCode}
{
        onDiscover(unit);
}
\end{DoxyCode}


\-Here is the call graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_a07c523e9b576ad07f72a81b6861acc82_cgraph}
\end{center}
\end{figure}


\hypertarget{classPlayerTrackerClass_ad88c08703ff6108bf048cbebb43235ec}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!on\-Player\-Left@{on\-Player\-Left}}
\index{on\-Player\-Left@{on\-Player\-Left}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{on\-Player\-Left}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Player\-Tracker\-Class\-::on\-Player\-Left} (
\begin{DoxyParamCaption}
\item[{{\bf \-Player}}]{player}
\end{DoxyParamCaption}
)}}\label{classPlayerTrackerClass_ad88c08703ff6108bf048cbebb43235ec}


\-Definition at line 79 of file \-Player\-Tracker.\-cpp.



\-References update\-Players().


\begin{DoxyCode}
{
        updatePlayers();
}
\end{DoxyCode}


\-Here is the call graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_ad88c08703ff6108bf048cbebb43235ec_cgraph}
\end{center}
\end{figure}


\hypertarget{classPlayerTrackerClass_ade207cef8af1042816e8490bc4d93071}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!player\-Has\-Reseached@{player\-Has\-Reseached}}
\index{player\-Has\-Reseached@{player\-Has\-Reseached}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{player\-Has\-Reseached}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Player\-Tracker\-Class\-::player\-Has\-Reseached} (
\begin{DoxyParamCaption}
\item[{{\bf \-Player}}]{player, }
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Tech\-Type}}]{tech}
\end{DoxyParamCaption}
)}}\label{classPlayerTrackerClass_ade207cef8af1042816e8490bc4d93071}


\-Definition at line 126 of file \-Player\-Tracker.\-cpp.



\-References m\-Researched.



\-Referenced by enemy\-Has\-Reseached().


\begin{DoxyCode}
{
        return mResearched[player].find(tech) != mResearched[player].end();
}
\end{DoxyCode}


\-Here is the caller graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_ade207cef8af1042816e8490bc4d93071_icgraph}
\end{center}
\end{figure}


\hypertarget{classPlayerTrackerClass_a3c1c2fa192a450f3b03a52bbb2d685d1}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!player\-Unit\-Count@{player\-Unit\-Count}}
\index{player\-Unit\-Count@{player\-Unit\-Count}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{player\-Unit\-Count}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Player\-Tracker\-Class\-::player\-Unit\-Count} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type}}]{unit, }
\item[{{\bf \-Player}}]{player = {\ttfamily {\bf \-B\-W\-A\-P\-I\-::\-Broodwar}-\/$>$self()}}
\end{DoxyParamCaption}
) const}}\label{classPlayerTrackerClass_a3c1c2fa192a450f3b03a52bbb2d685d1}


\-Definition at line 172 of file \-Player\-Tracker.\-cpp.



\-References \-Singleton$<$ T $>$\-::\-Instance().



\-Referenced by enemy\-Unit\-Count().


\begin{DoxyCode}
{
        return UnitTracker::Instance().selectAllUnits(unit, player).size();
}
\end{DoxyCode}


\-Here is the call graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_a3c1c2fa192a450f3b03a52bbb2d685d1_cgraph}
\end{center}
\end{figure}




\-Here is the caller graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_a3c1c2fa192a450f3b03a52bbb2d685d1_icgraph}
\end{center}
\end{figure}


\hypertarget{classPlayerTrackerClass_a827010e19bef18c967142567e64a5c59}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!update@{update}}
\index{update@{update}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Player\-Tracker\-Class\-::update} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classPlayerTrackerClass_a827010e19bef18c967142567e64a5c59}


\-Definition at line 14 of file \-Player\-Tracker.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-B\-W\-A\-P\-I\-::\-Game\-::draw\-Text(), \-B\-W\-A\-P\-I\-::\-Game\-::draw\-Text\-Screen(), get\-Allies(), \-Unit\-Helper\-::get\-Clusters(), get\-Enemies(), \-B\-W\-A\-P\-I\-::\-Player\-::get\-Name(), \-Singleton$<$ T $>$\-::\-Instance(), \-B\-W\-A\-P\-I\-::\-Unit\-Type\-::is\-Building(), \-Unit\-Helper\-::is\-Static\-Defense(), \-B\-W\-A\-P\-I\-::\-Unit\-Type\-::is\-Worker(), \-Access\-Type\-Def\-::\-Lost, m\-Enemy\-Clusters, m\-Enemy\-Race\-Info, m\-Show\-Debug\-Info, \-B\-W\-A\-P\-I\-::\-Races\-::\-Protoss, \-B\-W\-A\-P\-I\-::\-Coordinate\-Type\-::\-Screen, \-B\-W\-A\-P\-I\-::\-Races\-::\-Terran, \-B\-W\-A\-P\-I\-::\-Unit\-Types\-::\-Terran\-\_\-\-Vulture\-\_\-\-Spider\-\_\-\-Mine, update\-Players(), \-B\-W\-A\-P\-I\-::\-Races\-::\-Zerg, \-B\-W\-A\-P\-I\-::\-Unit\-Types\-::\-Zerg\-\_\-\-Egg, \-B\-W\-A\-P\-I\-::\-Unit\-Types\-::\-Zerg\-\_\-\-Larva, and \-B\-W\-A\-P\-I\-::\-Unit\-Types\-::\-Zerg\-\_\-\-Overlord.


\begin{DoxyCode}
{
        if(mShowDebugInfo)
        {
                std::stringstream ss;
                ss << "There are ";

                if(mEnemyRaceInfo[BWAPI::Races::Zerg])
                        ss << "[Zerg]";

                if(mEnemyRaceInfo[BWAPI::Races::Terran])
                        ss << "[Terran]";

                if(mEnemyRaceInfo[BWAPI::Races::Protoss])
                        ss << "[Protoss]";

                ss << " Enemy Races";

                BWAPI::Broodwar->drawText(BWAPI::CoordinateType::Screen, 15, 5,
       "%s", ss.str().c_str());

                int y = 20;
                if(!getEnemies().empty())
                {
                        BWAPI::Broodwar->drawTextScreen(5, y, "Enemies:");
                        for each(Player player in getEnemies())
                        {
                                y += 10;
                                BWAPI::Broodwar->drawTextScreen(15, y, "%s", 
      player->getName().c_str());
                        }
                }

                if(!getAllies().empty())
                {
                        y += 10;
                        BWAPI::Broodwar->drawTextScreen(5, y, "Allies:");
                        for each(Player player in getAllies())
                        {
                                y+=10;
                                BWAPI::Broodwar->drawTextScreen(15, y, "%s", 
      player->getName().c_str());
                        }
                }
        }

        if(BWAPI::Broodwar->getFrameCount() % 240 == 0)
                updatePlayers();

        UnitGroup allEnemyUnits;
        for each(Unit unit in UnitTracker::Instance().selectAllEnemy())
        {
                if(unit->accessibility() == AccessType::Lost)
                        continue;

                const BWAPI::UnitType &type = unit->getType();
                if(type.isBuilding() && !UnitHelper::isStaticDefense(type))
                        continue;

                if(type.isWorker() || type == 
      BWAPI::UnitTypes::Terran_Vulture_Spider_Mine || type == 
      BWAPI::UnitTypes::Zerg_Overlord || type == BWAPI::UnitTypes::Zerg_Larva || type
       == BWAPI::UnitTypes::Zerg_Egg)
                        continue;

                allEnemyUnits.insert(unit);
        }

        mEnemyClusters = UnitHelper::getClusters(allEnemyUnits, 384, 1);
}
\end{DoxyCode}


\-Here is the call graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_a827010e19bef18c967142567e64a5c59_cgraph}
\end{center}
\end{figure}


\hypertarget{classPlayerTrackerClass_ae84ceefe6a0bbd8823faaac57313a9da}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!update\-Players@{update\-Players}}
\index{update\-Players@{update\-Players}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{update\-Players}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Player\-Tracker\-Class\-::update\-Players} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classPlayerTrackerClass_ae84ceefe6a0bbd8823faaac57313a9da}


\-Definition at line 97 of file \-Player\-Tracker.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-B\-W\-A\-P\-I\-::\-Player\-::get\-Race(), \-B\-W\-A\-P\-I\-::\-Player\-::left\-Game(), m\-Allies, m\-Enemies, and m\-Enemy\-Race\-Info.



\-Referenced by on\-Begin(), on\-Player\-Left(), and update().


\begin{DoxyCode}
{
        mEnemies.clear();
        mAllies.clear();
        mEnemyRaceInfo.clear();

        for each(Player player in BWAPI::Broodwar->getPlayers())
        {
                if(player->leftGame())
                        continue;

                if(player == BWAPI::Broodwar->self())
                        continue;

                if(BWAPI::Broodwar->self()->isEnemy(player))
                {
                        mEnemies.insert(player);
                        mEnemyRaceInfo[player->getRace()] = true;
                }
                else if(BWAPI::Broodwar->self()->isAlly(player))
                        mAllies.insert(player);
        }
}
\end{DoxyCode}


\-Here is the call graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_ae84ceefe6a0bbd8823faaac57313a9da_cgraph}
\end{center}
\end{figure}




\-Here is the caller graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classPlayerTrackerClass_ae84ceefe6a0bbd8823faaac57313a9da_icgraph}
\end{center}
\end{figure}




\subsection{\-Member \-Data \-Documentation}
\hypertarget{classPlayerTrackerClass_a8ebce68ed3b3183fd501cd39cc2ac027}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!m\-Allies@{m\-Allies}}
\index{m\-Allies@{m\-Allies}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{m\-Allies}]{\setlength{\rightskip}{0pt plus 5cm}std\-::set$<${\bf \-Player}$>$ {\bf \-Player\-Tracker\-Class\-::m\-Allies}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPlayerTrackerClass_a8ebce68ed3b3183fd501cd39cc2ac027}


\-Definition at line 38 of file \-Player\-Tracker.\-h.



\-Referenced by get\-Allies(), and update\-Players().

\hypertarget{classPlayerTrackerClass_a11940f7cdbe3d85b44e1a93390ce48ea}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!m\-Enemies@{m\-Enemies}}
\index{m\-Enemies@{m\-Enemies}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{m\-Enemies}]{\setlength{\rightskip}{0pt plus 5cm}std\-::set$<${\bf \-Player}$>$ {\bf \-Player\-Tracker\-Class\-::m\-Enemies}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPlayerTrackerClass_a11940f7cdbe3d85b44e1a93390ce48ea}


\-Definition at line 37 of file \-Player\-Tracker.\-h.



\-Referenced by get\-Enemies(), and update\-Players().

\hypertarget{classPlayerTrackerClass_af638f01b52d95b6fe576cbec0f35c9d5}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!m\-Enemy\-Clusters@{m\-Enemy\-Clusters}}
\index{m\-Enemy\-Clusters@{m\-Enemy\-Clusters}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{m\-Enemy\-Clusters}]{\setlength{\rightskip}{0pt plus 5cm}std\-::vector$<${\bf \-Unit\-Group}$>$ {\bf \-Player\-Tracker\-Class\-::m\-Enemy\-Clusters}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPlayerTrackerClass_af638f01b52d95b6fe576cbec0f35c9d5}


\-Definition at line 46 of file \-Player\-Tracker.\-h.



\-Referenced by get\-Enemy\-Clusters(), and update().

\hypertarget{classPlayerTrackerClass_af97413b853a229155fb3a87c6729626d}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!m\-Enemy\-Race\-Info@{m\-Enemy\-Race\-Info}}
\index{m\-Enemy\-Race\-Info@{m\-Enemy\-Race\-Info}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{m\-Enemy\-Race\-Info}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-B\-W\-A\-P\-I\-::\-Race}, bool$>$ {\bf \-Player\-Tracker\-Class\-::m\-Enemy\-Race\-Info}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPlayerTrackerClass_af97413b853a229155fb3a87c6729626d}


\-Definition at line 40 of file \-Player\-Tracker.\-h.



\-Referenced by is\-Enemy\-Race(), update(), and update\-Players().

\hypertarget{classPlayerTrackerClass_a96bef3318dff901311f7c4e33b907640}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!m\-Player\-Has\-Offensive\-Units\-Need\-Detection@{m\-Player\-Has\-Offensive\-Units\-Need\-Detection}}
\index{m\-Player\-Has\-Offensive\-Units\-Need\-Detection@{m\-Player\-Has\-Offensive\-Units\-Need\-Detection}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{m\-Player\-Has\-Offensive\-Units\-Need\-Detection}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-Player}, bool$>$ {\bf \-Player\-Tracker\-Class\-::m\-Player\-Has\-Offensive\-Units\-Need\-Detection}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPlayerTrackerClass_a96bef3318dff901311f7c4e33b907640}


\-Definition at line 42 of file \-Player\-Tracker.\-h.

\hypertarget{classPlayerTrackerClass_a8672dbd760eacefdd0a255377949b28f}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!m\-Researched@{m\-Researched}}
\index{m\-Researched@{m\-Researched}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{m\-Researched}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-Player}, std\-::set$<${\bf \-B\-W\-A\-P\-I\-::\-Tech\-Type}$>$ $>$ {\bf \-Player\-Tracker\-Class\-::m\-Researched}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPlayerTrackerClass_a8672dbd760eacefdd0a255377949b28f}


\-Definition at line 44 of file \-Player\-Tracker.\-h.



\-Referenced by on\-Discover(), and player\-Has\-Reseached().

\hypertarget{classPlayerTrackerClass_a269081382197a8c6e49f373430c2e6fd}{\index{\-Player\-Tracker\-Class@{\-Player\-Tracker\-Class}!m\-Show\-Debug\-Info@{m\-Show\-Debug\-Info}}
\index{m\-Show\-Debug\-Info@{m\-Show\-Debug\-Info}!PlayerTrackerClass@{\-Player\-Tracker\-Class}}
\subsubsection[{m\-Show\-Debug\-Info}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Player\-Tracker\-Class\-::m\-Show\-Debug\-Info}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classPlayerTrackerClass_a269081382197a8c6e49f373430c2e6fd}


\-Definition at line 48 of file \-Player\-Tracker.\-h.



\-Referenced by update().



\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\-Skynet/\-Skynet/\hyperlink{PlayerTracker_8h}{\-Player\-Tracker.\-h}\item 
\-Skynet/\-Skynet/\hyperlink{PlayerTracker_8cpp}{\-Player\-Tracker.\-cpp}\end{DoxyCompactItemize}
