+ if (_smell == 1){
+ hash_map<string,int>::iterator location = maybeRobber.find(adj->first);
+ if (location == maybeRobber.end()){
+ hash_map<string, Intersection>::const_iterator intersection = _intersections.find(adj->first);
+ int neigh = maybeAtNeighbor(intersection->second);
+ if (neigh > -1){
+ maybeRobber[adj->first] = 100 + neigh;
+ ++possibilities;
+ }else
+ maybeRobber[adj->first] = -100;
+ }
+ }else{
+ if (_smell == 0)
+ maybeRobber[adj->first] = -100;
+ hash_map<string, Intersection>::const_iterator intersection = _intersections.find(adj->first);
+ for (hash_map<string,StreetType>::const_iterator adj = intersection->second.connections.begin();
+ adj != intersection->second.connections.end(); ++adj){
+ hash_map<string,int>::iterator location = maybeRobber.find(adj->first);
+ if (location == maybeRobber.end()){
+ if (_smell == 0)
+ maybeRobber[adj->first] = -100;
+ else {
+ hash_map<string, Intersection>::const_iterator intersection = _intersections.find(adj->first);
+ int neigh = maybeAtNeighbor(intersection->second);
+ if (neigh > -1){
+ maybeRobber[adj->first] = 100 + neigh;
+ ++possibilities;
+ }
+ else
+ maybeRobber[adj->first] = -100;
+ }
+ }
+ }
+ }
+ }
+ } else {
+ maybeRobber[_robberLocation] = 100;
+ possibilities = 1;
+ hash_map<string, Intersection>::const_iterator intersection = _intersections.find(_location);
+
+ for (hash_map<string,StreetType>::const_iterator adj = intersection->second.connections.begin();
+ adj != intersection->second.connections.end(); ++adj){
+ maybeRobber[adj->first] = -100;
+ for (hash_map<string,StreetType>::const_iterator adj = intersection->second.connections.begin();
+ adj != intersection->second.connections.end(); ++adj){
+ hash_map<string,int>::iterator location = maybeRobber.find(adj->first);
+ if (location != maybeRobber.end())
+ maybeRobber[adj->first] = -100;
+ }
+
+ }
+
+
+ }