MCPcopy Create free account
hub / github.com/bwapi/bwapi / hasValidSpace

Method hasValidSpace

bwapi/BWAPILIB/Source/Game.cpp:171–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169 };
170
171 bool hasValidSpace() const
172 {
173 // Get min/max distances
174 int min = MAX_RANGE/2 - maxSearch/2;
175 int max = min + maxSearch;
176 for ( int y = min; y < max; ++y )
177 {
178 for ( int x = min; x < max; ++x )
179 {
180 if ( this->getValue(x,y) == 1 )
181 return true;
182 }
183 }
184 return false;
185 };
186
187 void backup()
188 {

Callers 1

ReservePlacementFunction · 0.80

Calls 1

getValueMethod · 0.95

Tested by

no test coverage detected