\hypertarget{classMineBlockingMineralTask}{\section{\-Mine\-Blocking\-Mineral\-Task \-Class \-Reference}
\label{classMineBlockingMineralTask}\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}}
}


{\ttfamily \#include $<$\-Mine\-Blocking\-Mineral\-Task.\-h$>$}



\-Inheritance diagram for \-Mine\-Blocking\-Mineral\-Task\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=550pt]{classMineBlockingMineralTask__inherit__graph}
\end{center}
\end{figure}


\-Collaboration diagram for \-Mine\-Blocking\-Mineral\-Task\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=550pt]{classMineBlockingMineralTask__coll__graph}
\end{center}
\end{figure}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classMineBlockingMineralTask_ab73eac0d99a267e501d61082cc1a328d}{\-Mine\-Blocking\-Mineral\-Task} (\hyperlink{Task_8h_a7b31e3712710b22657fc622787547497}{\-Task\-Type} priority, \hyperlink{classUnitGroup}{\-Unit\-Group} minerals)
\item 
virtual int \hyperlink{classMineBlockingMineralTask_a4d0b9c89b3f2efef56b9701ce7004cca}{get\-End\-Time} () const 
\item 
virtual int \hyperlink{classMineBlockingMineralTask_abb37c8927b0d1e47d344fc59066695ef}{get\-End\-Time} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit) const 
\item 
virtual int \hyperlink{classMineBlockingMineralTask_acbe0eac630b96fa45446e25927c80563}{get\-Priority} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit) const 
\item 
virtual \hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} \hyperlink{classMineBlockingMineralTask_aa10ec6225b850d98a7f1f031ce025e89}{get\-Start\-Location} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit) const 
\item 
virtual \hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} \hyperlink{classMineBlockingMineralTask_a4ed84d0ad0cc74649f397905157ff1e0}{get\-End\-Location} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit) const 
\item 
virtual bool \hyperlink{classMineBlockingMineralTask_a51b6df031559dda49049e2418040423c}{pre\-Update} ()
\item 
virtual bool \hyperlink{classMineBlockingMineralTask_a3af65221f183f034e86a477e5e6f72ba}{update} ()
\item 
virtual void \hyperlink{classMineBlockingMineralTask_a5cb5ade7c0646b0522f793a9e0335f7c}{update\-Requirements} ()
\item 
virtual bool \hyperlink{classMineBlockingMineralTask_ac53c48d0404f309ee33d80a4544218b0}{waiting\-For\-Unit} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit) const 
\item 
virtual void \hyperlink{classMineBlockingMineralTask_aec8d87082cc480f5aa643ef0f5d54724}{give\-Unit} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\item 
virtual void \hyperlink{classMineBlockingMineralTask_adde7c863eacab49e055907ef1d78a645}{return\-Unit} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit)
\item 
virtual bool \hyperlink{classMineBlockingMineralTask_aef2d8df6cb6d5053f0dfd54b12d4bb4c}{morph} (\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} unit, \hyperlink{classBWAPI_1_1UnitType}{\-B\-W\-A\-P\-I\-::\-Unit\-Type} previous\-Type)
\item 
virtual \hyperlink{classUnitGroup}{\-Unit\-Group} \hyperlink{classMineBlockingMineralTask_a64c815ecd9140fc52bc4f9bcd735df63}{get\-Finished\-Units} ()
\item 
virtual std\-::string \hyperlink{classMineBlockingMineralTask_a2929b6c333f8f91cab9b5c86de4232bf}{get\-Task\-Name} () const 
\item 
virtual std\-::string \hyperlink{classMineBlockingMineralTask_a22edd3f91b95ebbf84fc9b9efd2c2ae3}{get\-Output\-Name} () const 
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{Interface_8h_ab8fbb9e601c27f783b69f16c5a1fd40a}{\-Unit} \hyperlink{classMineBlockingMineralTask_afc15b26f7d0a049fc110c2174484ddae}{m\-Unit}
\item 
\hyperlink{classUnitGroup}{\-Unit\-Group} \hyperlink{classMineBlockingMineralTask_aa25acb01962e64a6aed96a9c60cdf39e}{m\-Minerals}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}


\-Definition at line 8 of file \-Mine\-Blocking\-Mineral\-Task.\-h.



\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classMineBlockingMineralTask_ab73eac0d99a267e501d61082cc1a328d}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}}
\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{\-Mine\-Blocking\-Mineral\-Task}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Mine\-Blocking\-Mineral\-Task\-::\-Mine\-Blocking\-Mineral\-Task} (
\begin{DoxyParamCaption}
\item[{{\bf \-Task\-Type}}]{priority, }
\item[{{\bf \-Unit\-Group}}]{minerals}
\end{DoxyParamCaption}
)}}\label{classMineBlockingMineralTask_ab73eac0d99a267e501d61082cc1a328d}


\-Definition at line 3 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.


\begin{DoxyCode}
        : Task(priority)
        , mMinerals(minerals)
{
}
\end{DoxyCode}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classMineBlockingMineralTask_a4ed84d0ad0cc74649f397905157ff1e0}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!get\-End\-Location@{get\-End\-Location}}
\index{get\-End\-Location@{get\-End\-Location}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{get\-End\-Location}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Position} {\bf \-Mine\-Blocking\-Mineral\-Task\-::get\-End\-Location} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_a4ed84d0ad0cc74649f397905157ff1e0}


\-Implements \hyperlink{classTask_ae1c96f2085a7126fb0baf5f039caeee4}{\-Task}.



\-Definition at line 29 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.


\begin{DoxyCode}
{
        return unit->getPosition();
}
\end{DoxyCode}
\hypertarget{classMineBlockingMineralTask_a4d0b9c89b3f2efef56b9701ce7004cca}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!get\-End\-Time@{get\-End\-Time}}
\index{get\-End\-Time@{get\-End\-Time}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{get\-End\-Time}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Mine\-Blocking\-Mineral\-Task\-::get\-End\-Time} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_a4d0b9c89b3f2efef56b9701ce7004cca}


\-Implements \hyperlink{classTask_a2d89c4f298ec499a3ecc02c45c361f41}{\-Task}.



\-Definition at line 9 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.



\-References \-Requirement\-::max\-Time.



\-Referenced by get\-End\-Time().


\begin{DoxyCode}
{
        return Requirement::maxTime;
}
\end{DoxyCode}


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


\hypertarget{classMineBlockingMineralTask_abb37c8927b0d1e47d344fc59066695ef}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!get\-End\-Time@{get\-End\-Time}}
\index{get\-End\-Time@{get\-End\-Time}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{get\-End\-Time}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Mine\-Blocking\-Mineral\-Task\-::get\-End\-Time} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_abb37c8927b0d1e47d344fc59066695ef}


\-Implements \hyperlink{classTask_afba4a0f2a63ee2bd30b29bee33324982}{\-Task}.



\-Definition at line 14 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.



\-References get\-End\-Time().


\begin{DoxyCode}
{
        return getEndTime();
}
\end{DoxyCode}


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


\hypertarget{classMineBlockingMineralTask_a64c815ecd9140fc52bc4f9bcd735df63}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!get\-Finished\-Units@{get\-Finished\-Units}}
\index{get\-Finished\-Units@{get\-Finished\-Units}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{get\-Finished\-Units}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit\-Group} {\bf \-Mine\-Blocking\-Mineral\-Task\-::get\-Finished\-Units} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_a64c815ecd9140fc52bc4f9bcd735df63}


\-Implements \hyperlink{classTask_af44e192b780e39d89c79f40d92a1e2a8}{\-Task}.



\-Definition at line 111 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.



\-References \-Unit\-Group\-::insert(), and m\-Unit.


\begin{DoxyCode}
{
        UnitGroup returnUnits;

        returnUnits.insert(mUnit);

        return returnUnits;
}\end{DoxyCode}


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


\hypertarget{classMineBlockingMineralTask_a22edd3f91b95ebbf84fc9b9efd2c2ae3}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!get\-Output\-Name@{get\-Output\-Name}}
\index{get\-Output\-Name@{get\-Output\-Name}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{get\-Output\-Name}]{\setlength{\rightskip}{0pt plus 5cm}virtual std\-::string {\bf \-Mine\-Blocking\-Mineral\-Task\-::get\-Output\-Name} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}\label{classMineBlockingMineralTask_a22edd3f91b95ebbf84fc9b9efd2c2ae3}


\-Implements \hyperlink{classTask_ad6349b722f8dd48bcde4020d225d047b}{\-Task}.



\-Definition at line 33 of file \-Mine\-Blocking\-Mineral\-Task.\-h.


\begin{DoxyCode}
{ return ""; }
\end{DoxyCode}
\hypertarget{classMineBlockingMineralTask_acbe0eac630b96fa45446e25927c80563}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!get\-Priority@{get\-Priority}}
\index{get\-Priority@{get\-Priority}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{get\-Priority}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Mine\-Blocking\-Mineral\-Task\-::get\-Priority} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_acbe0eac630b96fa45446e25927c80563}


\-Implements \hyperlink{classTask_a01453612cced63eaf9e8c1de24742415}{\-Task}.



\-Definition at line 19 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.


\begin{DoxyCode}
{
        return 35;
}
\end{DoxyCode}
\hypertarget{classMineBlockingMineralTask_aa10ec6225b850d98a7f1f031ce025e89}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!get\-Start\-Location@{get\-Start\-Location}}
\index{get\-Start\-Location@{get\-Start\-Location}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{get\-Start\-Location}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Position} {\bf \-Mine\-Blocking\-Mineral\-Task\-::get\-Start\-Location} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_aa10ec6225b850d98a7f1f031ce025e89}


\-Implements \hyperlink{classTask_a5b911073755ecca5536db6c73fb85127}{\-Task}.



\-Definition at line 24 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.


\begin{DoxyCode}
{
        return unit->getPosition();
}
\end{DoxyCode}
\hypertarget{classMineBlockingMineralTask_a2929b6c333f8f91cab9b5c86de4232bf}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!get\-Task\-Name@{get\-Task\-Name}}
\index{get\-Task\-Name@{get\-Task\-Name}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{get\-Task\-Name}]{\setlength{\rightskip}{0pt plus 5cm}virtual std\-::string {\bf \-Mine\-Blocking\-Mineral\-Task\-::get\-Task\-Name} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}\label{classMineBlockingMineralTask_a2929b6c333f8f91cab9b5c86de4232bf}


\-Implements \hyperlink{classTask_ad188a18386ae1120317eac922228ce18}{\-Task}.



\-Definition at line 32 of file \-Mine\-Blocking\-Mineral\-Task.\-h.


\begin{DoxyCode}
{ return "Mine Blocking Mineral"; }
\end{DoxyCode}
\hypertarget{classMineBlockingMineralTask_aec8d87082cc480f5aa643ef0f5d54724}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!give\-Unit@{give\-Unit}}
\index{give\-Unit@{give\-Unit}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{give\-Unit}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Mine\-Blocking\-Mineral\-Task\-::give\-Unit} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_aec8d87082cc480f5aa643ef0f5d54724}


\-Implements \hyperlink{classTask_a40f1808c208279c99223c1ce5bc9607d}{\-Task}.



\-Definition at line 96 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.



\-References m\-Unit.


\begin{DoxyCode}
{
        mUnit = unit;
}
\end{DoxyCode}
\hypertarget{classMineBlockingMineralTask_aef2d8df6cb6d5053f0dfd54b12d4bb4c}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!morph@{morph}}
\index{morph@{morph}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{morph}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Mine\-Blocking\-Mineral\-Task\-::morph} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit, }
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Unit\-Type}}]{previous\-Type}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_aef2d8df6cb6d5053f0dfd54b12d4bb4c}


\-Implements \hyperlink{classTask_a084117559b93bfb82c4f6c3b88c6609c}{\-Task}.



\-Definition at line 106 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.


\begin{DoxyCode}
{
        return true;
}
\end{DoxyCode}
\hypertarget{classMineBlockingMineralTask_a51b6df031559dda49049e2418040423c}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!pre\-Update@{pre\-Update}}
\index{pre\-Update@{pre\-Update}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{pre\-Update}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Mine\-Blocking\-Mineral\-Task\-::pre\-Update} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_a51b6df031559dda49049e2418040423c}


\-Implements \hyperlink{classTask_a3cb1ce7dab90a8a2290381f78b665fe4}{\-Task}.



\-Definition at line 34 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.



\-References \-Unit\-Group\-::begin(), \-Task\-::complete(), \-Access\-Type\-Def\-::\-Dead, \-Unit\-Group\-::empty(), \-Unit\-Group\-::end(), \-Unit\-Group\-::erase(), \-Task\-::has\-Ended(), m\-Minerals, and m\-Unit.


\begin{DoxyCode}
{
        for(std::set<Unit>::iterator it = mMinerals.begin(); it != mMinerals.end
      ();)
        {
                if((*it)->accessibility() == AccessType::Dead)
                        mMinerals.erase(it++);
                else
                        ++it;
        }

        if(mMinerals.empty())
                complete();

        return hasEnded() && mUnit;
}
\end{DoxyCode}


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


\hypertarget{classMineBlockingMineralTask_adde7c863eacab49e055907ef1d78a645}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!return\-Unit@{return\-Unit}}
\index{return\-Unit@{return\-Unit}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{return\-Unit}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Mine\-Blocking\-Mineral\-Task\-::return\-Unit} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_adde7c863eacab49e055907ef1d78a645}


\-Implements \hyperlink{classTask_a34a365e54af1b184d43fcbf7a7730696}{\-Task}.



\-Definition at line 101 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.



\-References m\-Unit, and \-Static\-Units\-::nullunit.


\begin{DoxyCode}
{
        mUnit = StaticUnits::nullunit;
}
\end{DoxyCode}
\hypertarget{classMineBlockingMineralTask_a3af65221f183f034e86a477e5e6f72ba}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!update@{update}}
\index{update@{update}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Mine\-Blocking\-Mineral\-Task\-::update} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_a3af65221f183f034e86a477e5e6f72ba}


\-Implements \hyperlink{classTask_a88e5096a1943df5d72f3329af2bc2562}{\-Task}.



\-Definition at line 50 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.



\-References \-Task\-::has\-Ended(), m\-Minerals, and m\-Unit.


\begin{DoxyCode}
{
        if(mUnit)
        {
                if(mUnit->isCarryingGas() || mUnit->isCarryingMinerals())
                        mUnit->returnCargo();
                else
                {
                        Unit closestMineral;
                        int closestDistance = std::numeric_limits<int>::max();
                        for each(Unit mineral in mMinerals)
                        {
                                int distance = mineral->getDistance(mUnit);
                                if(distance < closestDistance)
                                {
                                        closestMineral = mineral;
                                        closestDistance = distance;
                                }
                        }

                        if(closestMineral)
                                mUnit->gather(closestMineral);
                }
        }

        return hasEnded() && !mUnit;
}
\end{DoxyCode}


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


\hypertarget{classMineBlockingMineralTask_a5cb5ade7c0646b0522f793a9e0335f7c}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!update\-Requirements@{update\-Requirements}}
\index{update\-Requirements@{update\-Requirements}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{update\-Requirements}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Mine\-Blocking\-Mineral\-Task\-::update\-Requirements} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_a5cb5ade7c0646b0522f793a9e0335f7c}


\-Reimplemented from \hyperlink{classTask_a939d9adfef004e349e78d5949ba37dd8}{\-Task}.



\-Definition at line 78 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.



\-References \-Task\-::add\-Requirement(), \-Requirement\-Group\-::add\-Unit\-Filter\-Requirement(), \-Unit\-Group\-::begin(), \-Task\-::clear\-Requirements(), \-Unit\-Group\-::empty(), \-Unit\-Filter\-Flags\-::\-Is\-Complete, \-Unit\-Filter\-Flags\-::\-Is\-Worker, \-Requirement\-::max\-Time, m\-Minerals, m\-Unit, and \-Task\-::should\-Return\-Unit().


\begin{DoxyCode}
{
        clearRequirements();

        if(!mUnit && !shouldReturnUnit() && !mMinerals.empty())
        {
                RequirementGroup requirementOne;
                requirementOne.addUnitFilterRequirement(35, Requirement::maxTime
      , UnitFilter(UnitFilterFlags::type(UnitFilterFlags::IsWorker | 
      UnitFilterFlags::IsComplete)), (*mMinerals.begin())->getPosition());

                addRequirement(requirementOne);
        }
}
\end{DoxyCode}


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


\hypertarget{classMineBlockingMineralTask_ac53c48d0404f309ee33d80a4544218b0}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!waiting\-For\-Unit@{waiting\-For\-Unit}}
\index{waiting\-For\-Unit@{waiting\-For\-Unit}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{waiting\-For\-Unit}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-Mine\-Blocking\-Mineral\-Task\-::waiting\-For\-Unit} (
\begin{DoxyParamCaption}
\item[{{\bf \-Unit}}]{unit}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}\label{classMineBlockingMineralTask_ac53c48d0404f309ee33d80a4544218b0}


\-Implements \hyperlink{classTask_a173eafb86a3d9d6c148d005f7778361c}{\-Task}.



\-Definition at line 91 of file \-Mine\-Blocking\-Mineral\-Task.\-cpp.


\begin{DoxyCode}
{
        return false;
}
\end{DoxyCode}


\subsection{\-Member \-Data \-Documentation}
\hypertarget{classMineBlockingMineralTask_aa25acb01962e64a6aed96a9c60cdf39e}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!m\-Minerals@{m\-Minerals}}
\index{m\-Minerals@{m\-Minerals}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{m\-Minerals}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit\-Group} {\bf \-Mine\-Blocking\-Mineral\-Task\-::m\-Minerals}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classMineBlockingMineralTask_aa25acb01962e64a6aed96a9c60cdf39e}


\-Definition at line 38 of file \-Mine\-Blocking\-Mineral\-Task.\-h.



\-Referenced by pre\-Update(), update(), and update\-Requirements().

\hypertarget{classMineBlockingMineralTask_afc15b26f7d0a049fc110c2174484ddae}{\index{\-Mine\-Blocking\-Mineral\-Task@{\-Mine\-Blocking\-Mineral\-Task}!m\-Unit@{m\-Unit}}
\index{m\-Unit@{m\-Unit}!MineBlockingMineralTask@{\-Mine\-Blocking\-Mineral\-Task}}
\subsubsection[{m\-Unit}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Unit} {\bf \-Mine\-Blocking\-Mineral\-Task\-::m\-Unit}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classMineBlockingMineralTask_afc15b26f7d0a049fc110c2174484ddae}


\-Definition at line 36 of file \-Mine\-Blocking\-Mineral\-Task.\-h.



\-Referenced by get\-Finished\-Units(), give\-Unit(), pre\-Update(), return\-Unit(), update(), and update\-Requirements().



\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\-Skynet/\-Skynet/\hyperlink{MineBlockingMineralTask_8h}{\-Mine\-Blocking\-Mineral\-Task.\-h}\item 
\-Skynet/\-Skynet/\hyperlink{MineBlockingMineralTask_8cpp}{\-Mine\-Blocking\-Mineral\-Task.\-cpp}\end{DoxyCompactItemize}
