Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool Road::allow_crossing(int lane)
- {
- if(lane==999)
- {
- for(int i=0;i<num_of_lanes;i++)
- {
- for(int k=0;k<7;k++)
- {
- if(road_condition[i][length-1-k]==true)
- return false;
- }
- }
- return true;
- }
- else
- {
- for(int k=0;k<7;k++)
- {
- if(road_condition[lane][length-1-k]==true)
- return false;
- }
- return true;
- }
- }
Add Comment
Please, Sign In to add comment