// General functions. bool LookupHQRegion(int holeNumber, RegionTable ®ionTable, int &start, int &end, int &score) { int regionLowIndex, regionHighIndex; regionLowIndex = regionHighIndex = 0; regionTable.LookupRegionsByHoleNumber(holeNumber, regionLowIndex, regionHighIndex); bool readHasGoodRegion = true; int regionIndex = regionLowIndex; while (regionIndex < regionHighIndex and regionTable.GetType(regionIndex) != HQRegion) { regionIndex++; } if (regionIndex == regionHighIndex) { start = end = score = 0; return false; } else { start = regionTable.GetStart(regionIndex); end = regionTable.GetEnd(regionIndex); score = regionTable.GetScore(regionIndex); return true; } }