Guest User

Untitled

a guest
Feb 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. bool Road::allow_crossing(int lane)
  2. {
  3. if(lane==999)
  4. {
  5. for(int i=0;i<num_of_lanes;i++)
  6. {
  7. for(int k=0;k<7;k++)
  8. {
  9. if(road_condition[i][length-1-k]==true)
  10. return false;
  11. }
  12. }
  13. return true;
  14. }
  15. else
  16. {
  17. for(int k=0;k<7;k++)
  18. {
  19. if(road_condition[lane][length-1-k]==true)
  20. return false;
  21.  
  22. }
  23. return true;
  24. }
  25. }
Add Comment
Please, Sign In to add comment