\hypertarget{classScoutManagerClass}{\section{\-Scout\-Manager\-Class \-Class \-Reference}
\label{classScoutManagerClass}\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}}
}


{\ttfamily \#include $<$\-Scout\-Manager.\-h$>$}

\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classScoutManagerClass_ac7fa9244ae73a6cd234cee4bd7866328}{\-Scout\-Manager\-Class} ()
\item 
void \hyperlink{classScoutManagerClass_a7b3d278acdd848765b82de7fea6a503f}{on\-Begin} ()
\item 
void \hyperlink{classScoutManagerClass_a4397a0578f582f1f04bb4a3d0a77d090}{update} ()
\item 
void \hyperlink{classScoutManagerClass_ab143060b7b25bca211a0e7c33ef8737b}{update\-Worker\-Scouts} ()
\item 
void \hyperlink{classScoutManagerClass_aca1f057502bd5e907f8c4442c281f6cd}{update\-Observer\-Scouts} ()
\item 
void \hyperlink{classScoutManagerClass_a6e978afa3c5406b857c68708b4960af1}{update\-Last\-Scout\-Type} (\hyperlink{ScoutData_8h_a3951f1ab933a5f06cae3ddac28e86de0}{\-Scout\-Data} data, \hyperlink{ScoutData_8h_a3170733c4f5f70c2b7468ccab4f0afa4}{\-Scout\-Type} type)
\item 
\hyperlink{ScoutData_8h_a3951f1ab933a5f06cae3ddac28e86de0}{\-Scout\-Data} \hyperlink{classScoutManagerClass_a446f54b60481a26bf6c056a09e4a7494}{get\-Scout\-Data} (\hyperlink{ScoutData_8h_a798328f72013d2734423b9d0307336c7}{\-Scout\-Unit\-Type} unit)
\item 
int \hyperlink{classScoutManagerClass_a3ed1f9ecc3c8adb942297700d743d8bd}{get\-Last\-Scout\-Time} (\hyperlink{Base_8h_aeee60104d9f1947526194ec22d997f69}{\-Base} base)
\item 
\hyperlink{ScoutData_8h_a3170733c4f5f70c2b7468ccab4f0afa4}{\-Scout\-Type} \hyperlink{classScoutManagerClass_ad2c3ff804cfbef073a82176bb914657d}{get\-Last\-Scout\-Type} (\hyperlink{Base_8h_aeee60104d9f1947526194ec22d997f69}{\-Base} base)
\item 
\hyperlink{ScoutData_8h_a3170733c4f5f70c2b7468ccab4f0afa4}{\-Scout\-Type} \hyperlink{classScoutManagerClass_ae8db2abb377c660fe2b50484e01e3ee3}{get\-Current\-Scout\-Type} (\hyperlink{Base_8h_aeee60104d9f1947526194ec22d997f69}{\-Base} base)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::set$<$ \hyperlink{ScoutData_8h_a3951f1ab933a5f06cae3ddac28e86de0}{\-Scout\-Data} $>$ \hyperlink{classScoutManagerClass_a394dc434364a4e0c09bef54aee833402}{m\-All\-Scout\-Data}
\item 
std\-::list$<$ \hyperlink{ScoutData_8h_a3951f1ab933a5f06cae3ddac28e86de0}{\-Scout\-Data} $>$ \hyperlink{classScoutManagerClass_a76d2e740d1fe1f7feab9204452ace338}{m\-Data\-Requiring\-Scout}
\item 
std\-::map$<$ \hyperlink{Base_8h_aeee60104d9f1947526194ec22d997f69}{\-Base}, int $>$ \hyperlink{classScoutManagerClass_a9032dbf4d9e02820f66e10edf64a311e}{m\-Last\-Scout\-Time}
\item 
std\-::map$<$ \hyperlink{Base_8h_aeee60104d9f1947526194ec22d997f69}{\-Base}, \hyperlink{ScoutData_8h_a3170733c4f5f70c2b7468ccab4f0afa4}{\-Scout\-Type} $>$ \hyperlink{classScoutManagerClass_ab866c26ccbad4b264f43b506c9e36920}{m\-Last\-Scout\-Type}
\item 
std\-::map$<$ \hyperlink{Base_8h_aeee60104d9f1947526194ec22d997f69}{\-Base}, \hyperlink{ScoutData_8h_a3170733c4f5f70c2b7468ccab4f0afa4}{\-Scout\-Type} $>$ \hyperlink{classScoutManagerClass_a671ddcfd98c428a01d8488ffb44ff6cb}{m\-Current\-Scout\-Type}
\item 
std\-::set$<$ \hyperlink{WorkerScoutTask_8h_a856a5df38a736483edbc6e91bdac3b8c}{\-Worker\-Scout\-Task\-Pointer} $>$ \hyperlink{classScoutManagerClass_acd8176e6f22fddb154b0228648621120}{m\-Worker\-Scouts}
\item 
std\-::set\*
$<$ \hyperlink{ObserverScoutTask_8h_aa2a45e5136127e9a26733a06d7a05c0b}{\-Observer\-Scout\-Task\-Pointer} $>$ \hyperlink{classScoutManagerClass_a9697ab52376e821a0c60281b2f4b13dd}{m\-Observer\-Scouts}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}


\-Definition at line 11 of file \-Scout\-Manager.\-h.



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


\-Definition at line 14 of file \-Scout\-Manager.\-h.


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


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classScoutManagerClass_ae8db2abb377c660fe2b50484e01e3ee3}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!get\-Current\-Scout\-Type@{get\-Current\-Scout\-Type}}
\index{get\-Current\-Scout\-Type@{get\-Current\-Scout\-Type}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{get\-Current\-Scout\-Type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Scout\-Type} {\bf \-Scout\-Manager\-Class\-::get\-Current\-Scout\-Type} (
\begin{DoxyParamCaption}
\item[{{\bf \-Base}}]{base}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classScoutManagerClass_ae8db2abb377c660fe2b50484e01e3ee3}


\-Definition at line 28 of file \-Scout\-Manager.\-h.



\-References m\-Current\-Scout\-Type.


\begin{DoxyCode}
{ return mCurrentScoutType[base]; }
\end{DoxyCode}
\hypertarget{classScoutManagerClass_a3ed1f9ecc3c8adb942297700d743d8bd}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!get\-Last\-Scout\-Time@{get\-Last\-Scout\-Time}}
\index{get\-Last\-Scout\-Time@{get\-Last\-Scout\-Time}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{get\-Last\-Scout\-Time}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Scout\-Manager\-Class\-::get\-Last\-Scout\-Time} (
\begin{DoxyParamCaption}
\item[{{\bf \-Base}}]{base}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classScoutManagerClass_a3ed1f9ecc3c8adb942297700d743d8bd}


\-Definition at line 26 of file \-Scout\-Manager.\-h.



\-References m\-Last\-Scout\-Time.


\begin{DoxyCode}
{ return mLastScoutTime[base]; }
\end{DoxyCode}
\hypertarget{classScoutManagerClass_ad2c3ff804cfbef073a82176bb914657d}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!get\-Last\-Scout\-Type@{get\-Last\-Scout\-Type}}
\index{get\-Last\-Scout\-Type@{get\-Last\-Scout\-Type}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{get\-Last\-Scout\-Type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Scout\-Type} {\bf \-Scout\-Manager\-Class\-::get\-Last\-Scout\-Type} (
\begin{DoxyParamCaption}
\item[{{\bf \-Base}}]{base}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classScoutManagerClass_ad2c3ff804cfbef073a82176bb914657d}


\-Definition at line 27 of file \-Scout\-Manager.\-h.



\-References m\-Last\-Scout\-Type.


\begin{DoxyCode}
{ return mLastScoutType[base]; }
\end{DoxyCode}
\hypertarget{classScoutManagerClass_a446f54b60481a26bf6c056a09e4a7494}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!get\-Scout\-Data@{get\-Scout\-Data}}
\index{get\-Scout\-Data@{get\-Scout\-Data}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{get\-Scout\-Data}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Scout\-Data} {\bf \-Scout\-Manager\-Class\-::get\-Scout\-Data} (
\begin{DoxyParamCaption}
\item[{{\bf \-Scout\-Unit\-Type}}]{unit}
\end{DoxyParamCaption}
)}}\label{classScoutManagerClass_a446f54b60481a26bf6c056a09e4a7494}


\-Definition at line 210 of file \-Scout\-Manager.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-Scout\-Type\-Def\-::\-Could\-Not\-Reach\-With\-Ground, \-Scout\-Type\-Def\-::\-Failed\-With\-Air, \-Scout\-Type\-Def\-::\-Failed\-With\-Ground\-High, \-Scout\-Type\-Def\-::\-Failed\-With\-Ground\-Low, \-B\-W\-A\-P\-I\-::\-Game\-::get\-Frame\-Count(), m\-Data\-Requiring\-Scout, m\-Last\-Scout\-Time, and m\-Last\-Scout\-Type.



\-Referenced by update\-Observer\-Scouts(), and update\-Worker\-Scouts().


\begin{DoxyCode}
{
        for(std::list<ScoutData>::iterator it = mDataRequiringScout.begin(); it
       != mDataRequiringScout.end(); ++it)
        {
                const ScoutData data = *it;
                if(unit == ScoutUnitType::Worker)
                {
                        if(data->getBase()->isEnemyBase() && BWAPI::Broodwar->
      getFrameCount() > 6000)
                                continue;
                        else if(mLastScoutType[data->getBase()] == 
      ScoutType::CouldNotReachWithGround)
                                continue;
                        else if(mLastScoutType[data->getBase()] == 
      ScoutType::FailedWithGroundHigh)
                                continue;
                        else if(mLastScoutType[data->getBase()] == 
      ScoutType::FailedWithGroundLow && mLastScoutTime[data->getBase()] + 3500 > 
      BWAPI::Broodwar->getFrameCount())
                                continue;
                }
                else if(unit == ScoutUnitType::Observer)
                {
                        if(mLastScoutType[data->getBase()] == 
      ScoutType::FailedWithAir)
                                continue;
                }

                mDataRequiringScout.erase(it);
                return data;
        }

        return ScoutData();
}\end{DoxyCode}


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




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


\hypertarget{classScoutManagerClass_a7b3d278acdd848765b82de7fea6a503f}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!on\-Begin@{on\-Begin}}
\index{on\-Begin@{on\-Begin}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{on\-Begin}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Scout\-Manager\-Class\-::on\-Begin} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classScoutManagerClass_a7b3d278acdd848765b82de7fea6a503f}


\-Definition at line 8 of file \-Scout\-Manager.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-Map\-Helper\-::get\-Ground\-Distance(), \-Scout\-Type\-Def\-::\-Initial\-Base\-Location\-Scout, \-Singleton$<$ T $>$\-::\-Instance(), m\-All\-Scout\-Data, m\-Current\-Scout\-Type, m\-Data\-Requiring\-Scout, m\-Last\-Scout\-Time, m\-Last\-Scout\-Type, \-B\-W\-A\-P\-I\-::\-Bullet\-Types\-::\-None, and \-B\-W\-A\-P\-I\-::\-Game\-::self().


\begin{DoxyCode}
{
        Base lastBase;
        std::set<Base> scoutBases;
        for each(Base base in BaseTracker::Instance().getAllBases())
        {
                mLastScoutTime[base] = 1500;
                mLastScoutType[base] = ScoutType::None;
                mCurrentScoutType[base] = ScoutType::None;

                if(base->isStartLocation())
                {
                        if(base->getPlayer() == BWAPI::Broodwar->self())
                                lastBase = base;
                        else
                                scoutBases.insert(base);
                }
        }

        if(!lastBase)
                return;

        while(!scoutBases.empty())
        {
                Base closestBase;
                int distance = std::numeric_limits<int>::max();
                for each(Base base in scoutBases)
                {
                        int thisDistance = MapHelper::getGroundDistance(base->
      getCenterLocation(), lastBase->getCenterLocation());
                        if(thisDistance < distance)
                        {
                                distance = thisDistance;
                                closestBase = base;
                        }
                }

                if(closestBase)
                {
                        ScoutData newData = ScoutData(new ScoutDataClass(
      closestBase, ScoutType::InitialBaseLocationScout));

                        mAllScoutData.insert(newData);
                        mDataRequiringScout.push_back(newData);

                        mCurrentScoutType[closestBase] = 
      ScoutType::InitialBaseLocationScout;

                        scoutBases.erase(closestBase);
                }

                lastBase = closestBase;
        }
}
\end{DoxyCode}


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


\hypertarget{classScoutManagerClass_a4397a0578f582f1f04bb4a3d0a77d090}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!update@{update}}
\index{update@{update}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Scout\-Manager\-Class\-::update} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classScoutManagerClass_a4397a0578f582f1f04bb4a3d0a77d090}


\-Definition at line 60 of file \-Scout\-Manager.\-cpp.



\-References \-Scout\-Type\-Def\-::\-Base\-Scout, \-B\-W\-A\-P\-I\-::\-Broodwar, \-Scout\-Type\-Def\-::\-Could\-Not\-Reach\-With\-Ground, \-Scout\-Type\-Def\-::\-Failed\-With\-Air, \-Scout\-Type\-Def\-::\-Failed\-With\-Ground\-High, \-Scout\-Type\-Def\-::\-Failed\-With\-Ground\-Low, \-B\-W\-A\-P\-I\-::\-Game\-::get\-Frame\-Count(), \-Singleton$<$ T $>$\-::\-Instance(), m\-All\-Scout\-Data, m\-Current\-Scout\-Type, m\-Data\-Requiring\-Scout, m\-Last\-Scout\-Time, m\-Last\-Scout\-Type, \-Scout\-Type\-Def\-::\-None, \-B\-W\-A\-P\-I\-::\-Bullet\-Types\-::\-None, \-Scout\-Type\-Def\-::\-Thorough\-Search, update\-Observer\-Scouts(), and update\-Worker\-Scouts().


\begin{DoxyCode}
{
        int time = BWAPI::Broodwar->getFrameCount();

        bool performThoroughSearch = (BaseTracker::Instance().getEnemyBases().
      empty() && time > 4000);
        ScoutType scoutType = performThoroughSearch ? ScoutType::ThoroughSearch
       : ScoutType::BaseScout;

        for each(Base base in BaseTracker::Instance().getAllBases())
        {
                if(mCurrentScoutType[base] != ScoutType::None)
                        continue;

                // If we are doing thorough searches ignore last scout as we
       just need to find the enemy
                bool lastGroundFailed = mLastScoutType[base] == 
      ScoutType::FailedWithGroundLow || mLastScoutType[base] == 
      ScoutType::FailedWithGroundHigh || mLastScoutType[base] == 
      ScoutType::CouldNotReachWithGround;
                if(performThoroughSearch && (lastGroundFailed || mLastScoutType
      [base] != ScoutType::FailedWithAir))
                {
                        mLastScoutType[base] = ScoutType::None;
                        lastGroundFailed = false;
                }

                int timeToReScout = 7000;
                if(lastGroundFailed)
                        timeToReScout = 0;
                else if(performThoroughSearch && mLastScoutType[base] != 
      scoutType && mCurrentScoutType[base] != scoutType)
                        timeToReScout = 0;
                else if(performThoroughSearch && (base->isAllyBase() || base->
      isMyBase()))
                        timeToReScout = 3500;
                else if(performThoroughSearch)
                        timeToReScout = 1500;
                else if(mLastScoutType[base] != ScoutType::FailedWithAir)
                        timeToReScout = 2000;
                else if(base->isEnemyBase())
                        timeToReScout = 3500;

                if(mLastScoutTime[base] + timeToReScout <= time)
                {
                        mLastScoutTime[base] = time;

                        ScoutData newData = ScoutData(new ScoutDataClass(base, 
      scoutType));

                        mAllScoutData.insert(newData);
                        mDataRequiringScout.push_back(newData);

                        mCurrentScoutType[base] = scoutType;
                }
        }

        for(std::set<ScoutData>::iterator it = mAllScoutData.begin(); it != 
      mAllScoutData.end();)
        {
                (*it)->update();

                if((*it)->isAchieved())
                {
                        mCurrentScoutType[(*it)->getBase()] = ScoutType::None;
                        mLastScoutType[(*it)->getBase()] = (*it)->getType();
                        mLastScoutTime[(*it)->getBase()] = time;
                        mAllScoutData.erase(it++);
                }
                else
                        ++it;
        }

        for(std::list<ScoutData>::iterator it = mDataRequiringScout.begin(); it
       != mDataRequiringScout.end();)
        {
                //(*it)->drawDebug(BWAPI::Colors::Red);

                if((*it)->isAchieved()) mDataRequiringScout.erase(it++);
                else ++it;
        }

        updateObserverScouts();
        updateWorkerScouts();

//      for each(Base base in BaseTracker::Instance().getAllBases())
//      {
//              int x = base->getRegion()->getCenter().x();
//              int y = base->getRegion()->getCenter().y();
// 
//              BWAPI::Broodwar->drawTextMap(x, y, "Last Type: %s",
       ScoutType::getName(mLastScoutType[base].underlying()).c_str());
//              BWAPI::Broodwar->drawTextMap(x, y+10, "This Type: %s",
       ScoutType::getName(mCurrentScoutType[base].underlying()).c_str());
//              BWAPI::Broodwar->drawTextMap(x, y+20, "Time: %d",
       mLastScoutTime[base]);
//      }
}
\end{DoxyCode}


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


\hypertarget{classScoutManagerClass_a6e978afa3c5406b857c68708b4960af1}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!update\-Last\-Scout\-Type@{update\-Last\-Scout\-Type}}
\index{update\-Last\-Scout\-Type@{update\-Last\-Scout\-Type}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{update\-Last\-Scout\-Type}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Scout\-Manager\-Class\-::update\-Last\-Scout\-Type} (
\begin{DoxyParamCaption}
\item[{{\bf \-Scout\-Data}}]{data, }
\item[{{\bf \-Scout\-Type}}]{type}
\end{DoxyParamCaption}
)}}\label{classScoutManagerClass_a6e978afa3c5406b857c68708b4960af1}


\-Definition at line 201 of file \-Scout\-Manager.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-B\-W\-A\-P\-I\-::\-Game\-::get\-Frame\-Count(), m\-All\-Scout\-Data, m\-Current\-Scout\-Type, m\-Last\-Scout\-Time, m\-Last\-Scout\-Type, and \-B\-W\-A\-P\-I\-::\-Bullet\-Types\-::\-None.


\begin{DoxyCode}
{
        mCurrentScoutType[data->getBase()] = ScoutType::None;
        mAllScoutData.erase(data);

        mLastScoutTime[data->getBase()] = BWAPI::Broodwar->getFrameCount();
        mLastScoutType[data->getBase()] = type;
}
\end{DoxyCode}


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


\hypertarget{classScoutManagerClass_aca1f057502bd5e907f8c4442c281f6cd}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!update\-Observer\-Scouts@{update\-Observer\-Scouts}}
\index{update\-Observer\-Scouts@{update\-Observer\-Scouts}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{update\-Observer\-Scouts}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Scout\-Manager\-Class\-::update\-Observer\-Scouts} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classScoutManagerClass_aca1f057502bd5e907f8c4442c281f6cd}


\-Definition at line 175 of file \-Scout\-Manager.\-cpp.



\-References get\-Scout\-Data(), \-Singleton$<$ T $>$\-::\-Instance(), m\-Observer\-Scouts, \-B\-W\-A\-P\-I\-::\-Unit\-Types\-::\-Protoss\-\_\-\-Observer, and \-Task\-Type\-Def\-::\-Scout.



\-Referenced by update().


\begin{DoxyCode}
{
        for(std::set<ObserverScoutTaskPointer>::iterator it = mObserverScouts.
      begin(); it != mObserverScouts.end();)
        {
                if((*it)->hasEnded())
                        mObserverScouts.erase(it++);
                else
                        ++it;
        }

        unsigned int curreentObservers = UnitTracker::Instance().selectAllUnits
      (BWAPI::UnitTypes::Protoss_Observer).size();
        unsigned int maxObservers = curreentObservers > 1 ? curreentObservers -
       1 : 0;
        //BWAPI::Broodwar->drawTextScreen(5, 35, "Max Observer Scouts : %u",
       maxObservers);
        //BWAPI::Broodwar->drawTextScreen(5, 45, "Current Observer Scouts :
       %u", mObserverScouts.size());

        if(maxObservers > mObserverScouts.size())
        {
                ScoutData data = getScoutData(ScoutUnitType::Observer);

                ObserverScoutTaskPointer task = ObserverScoutTaskPointer(new 
      ObserverScoutTask(TaskType::Scout, data));
                mObserverScouts.insert(task);

                TaskManager::Instance().addTask(task);
        }
}
\end{DoxyCode}


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




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


\hypertarget{classScoutManagerClass_ab143060b7b25bca211a0e7c33ef8737b}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!update\-Worker\-Scouts@{update\-Worker\-Scouts}}
\index{update\-Worker\-Scouts@{update\-Worker\-Scouts}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{update\-Worker\-Scouts}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Scout\-Manager\-Class\-::update\-Worker\-Scouts} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classScoutManagerClass_ab143060b7b25bca211a0e7c33ef8737b}


\-Definition at line 144 of file \-Scout\-Manager.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-B\-W\-A\-P\-I\-::\-Game\-::get\-Frame\-Count(), get\-Scout\-Data(), \-Singleton$<$ T $>$\-::\-Instance(), m\-Worker\-Scouts, \-Task\-Type\-Def\-::\-Scout, and \-Order\-Def\-::\-Scout.



\-Referenced by update().


\begin{DoxyCode}
{
        for(std::set<WorkerScoutTaskPointer>::iterator it = mWorkerScouts.begin
      (); it != mWorkerScouts.end();)
        {
                if((*it)->isFinishedScouting())
                        mWorkerScouts.erase(it++);
                else
                        ++it;
        }

        // use more workers the longer the game
        unsigned int maxForThisTime = !BuildOrderManager::Instance().getOrder(
      Order::Scout) ? 0 : BWAPI::Broodwar->getFrameCount() > 24*60*7 ? 2 : 1;

        //BWAPI::Broodwar->drawTextScreen(5, 15, "Max Worker Scouts : %u",
       maxForThisTime);
        //BWAPI::Broodwar->drawTextScreen(5, 25, "Current Worker Scouts : %u",
       mWorkerScouts.size());

        // if we are short on tasks for workers, create some
        if(maxForThisTime > mWorkerScouts.size())
        {
                ScoutData data = getScoutData(ScoutUnitType::Worker);

                if(data)
                {
                        WorkerScoutTaskPointer task = WorkerScoutTaskPointer(
      new WorkerScoutTask(TaskType::Scout, data));
                        mWorkerScouts.insert(task);

                        TaskManager::Instance().addTask(task);
                }
        }
}
\end{DoxyCode}


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




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




\subsection{\-Member \-Data \-Documentation}
\hypertarget{classScoutManagerClass_a394dc434364a4e0c09bef54aee833402}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!m\-All\-Scout\-Data@{m\-All\-Scout\-Data}}
\index{m\-All\-Scout\-Data@{m\-All\-Scout\-Data}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{m\-All\-Scout\-Data}]{\setlength{\rightskip}{0pt plus 5cm}std\-::set$<${\bf \-Scout\-Data}$>$ {\bf \-Scout\-Manager\-Class\-::m\-All\-Scout\-Data}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classScoutManagerClass_a394dc434364a4e0c09bef54aee833402}


\-Definition at line 31 of file \-Scout\-Manager.\-h.



\-Referenced by on\-Begin(), update(), and update\-Last\-Scout\-Type().

\hypertarget{classScoutManagerClass_a671ddcfd98c428a01d8488ffb44ff6cb}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!m\-Current\-Scout\-Type@{m\-Current\-Scout\-Type}}
\index{m\-Current\-Scout\-Type@{m\-Current\-Scout\-Type}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{m\-Current\-Scout\-Type}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-Base}, {\bf \-Scout\-Type}$>$ {\bf \-Scout\-Manager\-Class\-::m\-Current\-Scout\-Type}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classScoutManagerClass_a671ddcfd98c428a01d8488ffb44ff6cb}


\-Definition at line 36 of file \-Scout\-Manager.\-h.



\-Referenced by get\-Current\-Scout\-Type(), on\-Begin(), update(), and update\-Last\-Scout\-Type().

\hypertarget{classScoutManagerClass_a76d2e740d1fe1f7feab9204452ace338}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!m\-Data\-Requiring\-Scout@{m\-Data\-Requiring\-Scout}}
\index{m\-Data\-Requiring\-Scout@{m\-Data\-Requiring\-Scout}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{m\-Data\-Requiring\-Scout}]{\setlength{\rightskip}{0pt plus 5cm}std\-::list$<${\bf \-Scout\-Data}$>$ {\bf \-Scout\-Manager\-Class\-::m\-Data\-Requiring\-Scout}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classScoutManagerClass_a76d2e740d1fe1f7feab9204452ace338}


\-Definition at line 32 of file \-Scout\-Manager.\-h.



\-Referenced by get\-Scout\-Data(), on\-Begin(), and update().

\hypertarget{classScoutManagerClass_a9032dbf4d9e02820f66e10edf64a311e}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!m\-Last\-Scout\-Time@{m\-Last\-Scout\-Time}}
\index{m\-Last\-Scout\-Time@{m\-Last\-Scout\-Time}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{m\-Last\-Scout\-Time}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-Base}, int$>$ {\bf \-Scout\-Manager\-Class\-::m\-Last\-Scout\-Time}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classScoutManagerClass_a9032dbf4d9e02820f66e10edf64a311e}


\-Definition at line 34 of file \-Scout\-Manager.\-h.



\-Referenced by get\-Last\-Scout\-Time(), get\-Scout\-Data(), on\-Begin(), update(), and update\-Last\-Scout\-Type().

\hypertarget{classScoutManagerClass_ab866c26ccbad4b264f43b506c9e36920}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!m\-Last\-Scout\-Type@{m\-Last\-Scout\-Type}}
\index{m\-Last\-Scout\-Type@{m\-Last\-Scout\-Type}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{m\-Last\-Scout\-Type}]{\setlength{\rightskip}{0pt plus 5cm}std\-::map$<${\bf \-Base}, {\bf \-Scout\-Type}$>$ {\bf \-Scout\-Manager\-Class\-::m\-Last\-Scout\-Type}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classScoutManagerClass_ab866c26ccbad4b264f43b506c9e36920}


\-Definition at line 35 of file \-Scout\-Manager.\-h.



\-Referenced by get\-Last\-Scout\-Type(), get\-Scout\-Data(), on\-Begin(), update(), and update\-Last\-Scout\-Type().

\hypertarget{classScoutManagerClass_a9697ab52376e821a0c60281b2f4b13dd}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!m\-Observer\-Scouts@{m\-Observer\-Scouts}}
\index{m\-Observer\-Scouts@{m\-Observer\-Scouts}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{m\-Observer\-Scouts}]{\setlength{\rightskip}{0pt plus 5cm}std\-::set$<${\bf \-Observer\-Scout\-Task\-Pointer}$>$ {\bf \-Scout\-Manager\-Class\-::m\-Observer\-Scouts}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classScoutManagerClass_a9697ab52376e821a0c60281b2f4b13dd}


\-Definition at line 39 of file \-Scout\-Manager.\-h.



\-Referenced by update\-Observer\-Scouts().

\hypertarget{classScoutManagerClass_acd8176e6f22fddb154b0228648621120}{\index{\-Scout\-Manager\-Class@{\-Scout\-Manager\-Class}!m\-Worker\-Scouts@{m\-Worker\-Scouts}}
\index{m\-Worker\-Scouts@{m\-Worker\-Scouts}!ScoutManagerClass@{\-Scout\-Manager\-Class}}
\subsubsection[{m\-Worker\-Scouts}]{\setlength{\rightskip}{0pt plus 5cm}std\-::set$<${\bf \-Worker\-Scout\-Task\-Pointer}$>$ {\bf \-Scout\-Manager\-Class\-::m\-Worker\-Scouts}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classScoutManagerClass_acd8176e6f22fddb154b0228648621120}


\-Definition at line 38 of file \-Scout\-Manager.\-h.



\-Referenced by update\-Worker\-Scouts().



\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\-Skynet/\-Skynet/\hyperlink{ScoutManager_8h}{\-Scout\-Manager.\-h}\item 
\-Skynet/\-Skynet/\hyperlink{ScoutManager_8cpp}{\-Scout\-Manager.\-cpp}\end{DoxyCompactItemize}
