Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try{ //we use try-catch so we don't have to worry about bounds errors...
- if(x1-1 == x2 && y1 == y2){ //means we found target!
- node = {x1-1, y1, node[2]+1};
- search_q.push_back(node);
- findingTarget = false;
- break;
- }
- if(!isIntIn(map[y1][x1-1], blocked)){//if index is *not* in blocked list
- //we also gotta make sure node isn't in queue with lower distance already...
- }
- }catch(...){
- k = k; //do nothing pretty much
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement