\hypertarget{classChokepointClass}{\section{\-Chokepoint\-Class \-Class \-Reference}
\label{classChokepointClass}\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}}
}


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



\-Collaboration diagram for \-Chokepoint\-Class\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=550pt]{classChokepointClass__coll__graph}
\end{center}
\end{figure}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classChokepointClass_a13a1e069a1402328a3c7f850492076c7}{\-Chokepoint\-Class} (\hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} side1, \hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} side2, int clearance)
\item 
std\-::pair$<$ \hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position}, \hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} $>$ \hyperlink{classChokepointClass_a13ee7c49c08ada40d6602e428f1a6c07}{get\-Sides} ()
\item 
\hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} \hyperlink{classChokepointClass_a7a1b6a33ca240ef96d83facdc5056b7a}{get\-Center} ()
\item 
std\-::pair$<$ \hyperlink{Chokepoint_8h_ac1a1ed6cb736b2e1294c4740cd6c9e00}{\-Region}, \hyperlink{Chokepoint_8h_ac1a1ed6cb736b2e1294c4740cd6c9e00}{\-Region} $>$ \hyperlink{classChokepointClass_adb4a933a57c0d054c033cd2f9cd21055}{get\-Regions} ()
\item 
const std\-::pair$<$ \hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position}, \*
\hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position} $>$ \& \hyperlink{classChokepointClass_ad75b41a3e60adc05840ce9ae84ec2f97}{get\-Build\-Tiles} ()
\item 
void \hyperlink{classChokepointClass_a41162840f8eb12a085ed4aa5216b7ad4}{add\-Chokepoint\-Tile} (\hyperlink{Chokepoint_8h_a273daaf2382533f14202d8160cf22da5}{\-Weak\-Region} region, \hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position} tile)
\item 
void \hyperlink{classChokepointClass_a94e926720b43c0a3b2fad5f57b4c37f8}{draw} (\hyperlink{classBWAPI_1_1Color}{\-B\-W\-A\-P\-I\-::\-Color} color)
\item 
void \hyperlink{classChokepointClass_a27ebed23118b720bcef0d850fb92a385}{set\-Region1} (\hyperlink{Chokepoint_8h_a273daaf2382533f14202d8160cf22da5}{\-Weak\-Region} region)
\item 
void \hyperlink{classChokepointClass_abf818fdc539c83d44cbd9b841f36f9e2}{set\-Region2} (\hyperlink{Chokepoint_8h_a273daaf2382533f14202d8160cf22da5}{\-Weak\-Region} region)
\item 
int \hyperlink{classChokepointClass_a7698b8f0a33018d2ba6ec817b35d6b9e}{get\-Clearance} () const 
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
std\-::pair$<$ \hyperlink{Chokepoint_8h_a273daaf2382533f14202d8160cf22da5}{\-Weak\-Region}, \hyperlink{Chokepoint_8h_a273daaf2382533f14202d8160cf22da5}{\-Weak\-Region} $>$ \hyperlink{classChokepointClass_a2ca1eefc29bba92c7e438325edc90a8c}{m\-Regions}
\item 
std\-::pair$<$ \hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position}, \*
\hyperlink{Interface_8h_ad2186bdc15b990e538451931b3e11c67}{\-Tile\-Position} $>$ \hyperlink{classChokepointClass_a6ef351cf3203407f63ce96a9c91fbecc}{m\-Choketiles}
\item 
\hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} \hyperlink{classChokepointClass_a9744ca9db0893277c3e8a9934932e5f0}{m\-Center}
\item 
std\-::pair$<$ \hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position}, \hyperlink{Interface_8h_a7ae5d695cf6b7c013c5ad30d124278e0}{\-Position} $>$ \hyperlink{classChokepointClass_ab33cacddf5d3bd8d6eb15318e38f8a7a}{m\-Sides}
\item 
int \hyperlink{classChokepointClass_a7c67ac7afb3f3739d6e448cbbaf3ba8c}{m\-Clearance}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}


\-Definition at line 9 of file \-Chokepoint.\-h.



\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classChokepointClass_a13a1e069a1402328a3c7f850492076c7}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!\-Chokepoint\-Class@{\-Chokepoint\-Class}}
\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{\-Chokepoint\-Class}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Chokepoint\-Class\-::\-Chokepoint\-Class} (
\begin{DoxyParamCaption}
\item[{{\bf \-Position}}]{side1, }
\item[{{\bf \-Position}}]{side2, }
\item[{int}]{clearance}
\end{DoxyParamCaption}
)}}\label{classChokepointClass_a13a1e069a1402328a3c7f850492076c7}


\-Definition at line 5 of file \-Chokepoint.\-cpp.


\begin{DoxyCode}
        : mSides(side1, side2)
        , mClearance(clearance)
        , mCenter((side1.x() + side2.x()) / 2, (side1.y() + side2.y()) / 2)
{
}
\end{DoxyCode}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classChokepointClass_a41162840f8eb12a085ed4aa5216b7ad4}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!add\-Chokepoint\-Tile@{add\-Chokepoint\-Tile}}
\index{add\-Chokepoint\-Tile@{add\-Chokepoint\-Tile}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{add\-Chokepoint\-Tile}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Chokepoint\-Class\-::add\-Chokepoint\-Tile} (
\begin{DoxyParamCaption}
\item[{{\bf \-Weak\-Region}}]{region, }
\item[{{\bf \-Tile\-Position}}]{tile}
\end{DoxyParamCaption}
)}}\label{classChokepointClass_a41162840f8eb12a085ed4aa5216b7ad4}


\-Definition at line 12 of file \-Chokepoint.\-cpp.



\-References m\-Choketiles, and m\-Regions.


\begin{DoxyCode}
{
        if(region.lock() == mRegions.first.lock())
                mChoketiles.first = tile;

        if(region.lock() == mRegions.second.lock())
                mChoketiles.second = tile;
}
\end{DoxyCode}
\hypertarget{classChokepointClass_a94e926720b43c0a3b2fad5f57b4c37f8}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!draw@{draw}}
\index{draw@{draw}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{draw}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Chokepoint\-Class\-::draw} (
\begin{DoxyParamCaption}
\item[{{\bf \-B\-W\-A\-P\-I\-::\-Color}}]{color}
\end{DoxyParamCaption}
)}}\label{classChokepointClass_a94e926720b43c0a3b2fad5f57b4c37f8}


\-Definition at line 26 of file \-Chokepoint.\-cpp.



\-References \-B\-W\-A\-P\-I\-::\-Broodwar, \-B\-W\-A\-P\-I\-::\-Game\-::draw\-Box(), \-B\-W\-A\-P\-I\-::\-Game\-::draw\-Circle(), \-B\-W\-A\-P\-I\-::\-Game\-::draw\-Line(), \-B\-W\-A\-P\-I\-::\-Coordinate\-Type\-::\-Map, m\-Center, m\-Choketiles, m\-Sides, \-B\-W\-A\-P\-I\-::\-Position\-::x(), and \-B\-W\-A\-P\-I\-::\-Position\-::y().


\begin{DoxyCode}
{
        BWAPI::Broodwar->drawLine(BWAPI::CoordinateType::Map, mSides.first.x(),
       mSides.first.y(), mSides.second.x(), mSides.second.y(), color);

        BWAPI::Broodwar->drawBox(BWAPI::CoordinateType::Map, mChoketiles.first.
      x()*32, mChoketiles.first.y()*32, mChoketiles.first.x()*32+31, mChoketiles.first
      .y()*32+31, color);
        BWAPI::Broodwar->drawBox(BWAPI::CoordinateType::Map, mChoketiles.second
      .x()*32, mChoketiles.second.y()*32, mChoketiles.second.x()*32+31, mChoketiles.
      second.y()*32+31, color);

        BWAPI::Broodwar->drawLine(BWAPI::CoordinateType::Map, mChoketiles.first
      .x()*32+16, mChoketiles.first.y()*32+16, mCenter.x(), mCenter.y(), color);
        BWAPI::Broodwar->drawLine(BWAPI::CoordinateType::Map, mChoketiles.
      second.x()*32+16, mChoketiles.second.y()*32+16, mCenter.x(), mCenter.y(), color);

        BWAPI::Broodwar->drawCircle(BWAPI::CoordinateType::Map, mCenter.x(), 
      mCenter.y(), 32, color);
}\end{DoxyCode}


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


\hypertarget{classChokepointClass_ad75b41a3e60adc05840ce9ae84ec2f97}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!get\-Build\-Tiles@{get\-Build\-Tiles}}
\index{get\-Build\-Tiles@{get\-Build\-Tiles}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{get\-Build\-Tiles}]{\setlength{\rightskip}{0pt plus 5cm}const std\-::pair$<${\bf \-Tile\-Position}, {\bf \-Tile\-Position}$>$\& {\bf \-Chokepoint\-Class\-::get\-Build\-Tiles} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classChokepointClass_ad75b41a3e60adc05840ce9ae84ec2f97}


\-Definition at line 19 of file \-Chokepoint.\-h.



\-References m\-Choketiles.


\begin{DoxyCode}
{ return mChoketiles; }
\end{DoxyCode}
\hypertarget{classChokepointClass_a7a1b6a33ca240ef96d83facdc5056b7a}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!get\-Center@{get\-Center}}
\index{get\-Center@{get\-Center}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{get\-Center}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Position} {\bf \-Chokepoint\-Class\-::get\-Center} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classChokepointClass_a7a1b6a33ca240ef96d83facdc5056b7a}


\-Definition at line 15 of file \-Chokepoint.\-h.



\-References m\-Center.


\begin{DoxyCode}
{ return mCenter; }
\end{DoxyCode}
\hypertarget{classChokepointClass_a7698b8f0a33018d2ba6ec817b35d6b9e}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!get\-Clearance@{get\-Clearance}}
\index{get\-Clearance@{get\-Clearance}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{get\-Clearance}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Chokepoint\-Class\-::get\-Clearance} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classChokepointClass_a7698b8f0a33018d2ba6ec817b35d6b9e}


\-Definition at line 27 of file \-Chokepoint.\-h.



\-References m\-Clearance.


\begin{DoxyCode}
{ return mClearance; }
\end{DoxyCode}
\hypertarget{classChokepointClass_adb4a933a57c0d054c033cd2f9cd21055}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!get\-Regions@{get\-Regions}}
\index{get\-Regions@{get\-Regions}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{get\-Regions}]{\setlength{\rightskip}{0pt plus 5cm}std\-::pair$<$ {\bf \-Region}, {\bf \-Region} $>$ {\bf \-Chokepoint\-Class\-::get\-Regions} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classChokepointClass_adb4a933a57c0d054c033cd2f9cd21055}


\-Definition at line 21 of file \-Chokepoint.\-cpp.



\-References m\-Regions.


\begin{DoxyCode}
{
        return std::make_pair(mRegions.first.lock(), mRegions.second.lock());
}
\end{DoxyCode}
\hypertarget{classChokepointClass_a13ee7c49c08ada40d6602e428f1a6c07}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!get\-Sides@{get\-Sides}}
\index{get\-Sides@{get\-Sides}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{get\-Sides}]{\setlength{\rightskip}{0pt plus 5cm}std\-::pair$<${\bf \-Position}, {\bf \-Position}$>$ {\bf \-Chokepoint\-Class\-::get\-Sides} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classChokepointClass_a13ee7c49c08ada40d6602e428f1a6c07}


\-Definition at line 14 of file \-Chokepoint.\-h.



\-References m\-Sides.


\begin{DoxyCode}
{ return mSides; }
\end{DoxyCode}
\hypertarget{classChokepointClass_a27ebed23118b720bcef0d850fb92a385}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!set\-Region1@{set\-Region1}}
\index{set\-Region1@{set\-Region1}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{set\-Region1}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Chokepoint\-Class\-::set\-Region1} (
\begin{DoxyParamCaption}
\item[{{\bf \-Weak\-Region}}]{region}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classChokepointClass_a27ebed23118b720bcef0d850fb92a385}


\-Definition at line 24 of file \-Chokepoint.\-h.



\-References m\-Regions.


\begin{DoxyCode}
{ mRegions.first = region; }
\end{DoxyCode}
\hypertarget{classChokepointClass_abf818fdc539c83d44cbd9b841f36f9e2}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!set\-Region2@{set\-Region2}}
\index{set\-Region2@{set\-Region2}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{set\-Region2}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Chokepoint\-Class\-::set\-Region2} (
\begin{DoxyParamCaption}
\item[{{\bf \-Weak\-Region}}]{region}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}\label{classChokepointClass_abf818fdc539c83d44cbd9b841f36f9e2}


\-Definition at line 25 of file \-Chokepoint.\-h.



\-References m\-Regions.


\begin{DoxyCode}
{ mRegions.second = region; }
\end{DoxyCode}


\subsection{\-Member \-Data \-Documentation}
\hypertarget{classChokepointClass_a9744ca9db0893277c3e8a9934932e5f0}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!m\-Center@{m\-Center}}
\index{m\-Center@{m\-Center}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{m\-Center}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-Position} {\bf \-Chokepoint\-Class\-::m\-Center}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classChokepointClass_a9744ca9db0893277c3e8a9934932e5f0}


\-Definition at line 34 of file \-Chokepoint.\-h.



\-Referenced by draw(), and get\-Center().

\hypertarget{classChokepointClass_a6ef351cf3203407f63ce96a9c91fbecc}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!m\-Choketiles@{m\-Choketiles}}
\index{m\-Choketiles@{m\-Choketiles}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{m\-Choketiles}]{\setlength{\rightskip}{0pt plus 5cm}std\-::pair$<${\bf \-Tile\-Position}, {\bf \-Tile\-Position}$>$ {\bf \-Chokepoint\-Class\-::m\-Choketiles}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classChokepointClass_a6ef351cf3203407f63ce96a9c91fbecc}


\-Definition at line 32 of file \-Chokepoint.\-h.



\-Referenced by add\-Chokepoint\-Tile(), draw(), and get\-Build\-Tiles().

\hypertarget{classChokepointClass_a7c67ac7afb3f3739d6e448cbbaf3ba8c}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!m\-Clearance@{m\-Clearance}}
\index{m\-Clearance@{m\-Clearance}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{m\-Clearance}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-Chokepoint\-Class\-::m\-Clearance}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classChokepointClass_a7c67ac7afb3f3739d6e448cbbaf3ba8c}


\-Definition at line 36 of file \-Chokepoint.\-h.



\-Referenced by get\-Clearance().

\hypertarget{classChokepointClass_a2ca1eefc29bba92c7e438325edc90a8c}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!m\-Regions@{m\-Regions}}
\index{m\-Regions@{m\-Regions}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{m\-Regions}]{\setlength{\rightskip}{0pt plus 5cm}std\-::pair$<${\bf \-Weak\-Region}, {\bf \-Weak\-Region}$>$ {\bf \-Chokepoint\-Class\-::m\-Regions}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classChokepointClass_a2ca1eefc29bba92c7e438325edc90a8c}


\-Definition at line 30 of file \-Chokepoint.\-h.



\-Referenced by add\-Chokepoint\-Tile(), get\-Regions(), set\-Region1(), and set\-Region2().

\hypertarget{classChokepointClass_ab33cacddf5d3bd8d6eb15318e38f8a7a}{\index{\-Chokepoint\-Class@{\-Chokepoint\-Class}!m\-Sides@{m\-Sides}}
\index{m\-Sides@{m\-Sides}!ChokepointClass@{\-Chokepoint\-Class}}
\subsubsection[{m\-Sides}]{\setlength{\rightskip}{0pt plus 5cm}std\-::pair$<${\bf \-Position}, {\bf \-Position}$>$ {\bf \-Chokepoint\-Class\-::m\-Sides}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}\label{classChokepointClass_ab33cacddf5d3bd8d6eb15318e38f8a7a}


\-Definition at line 35 of file \-Chokepoint.\-h.



\-Referenced by draw(), and get\-Sides().



\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\-Skynet/\-Skynet/\hyperlink{Chokepoint_8h}{\-Chokepoint.\-h}\item 
\-Skynet/\-Skynet/\hyperlink{Chokepoint_8cpp}{\-Chokepoint.\-cpp}\end{DoxyCompactItemize}
