Advertisement
Guest User

Untitled

a guest
Sep 19th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. /**
  2. * @file crossroad.cpp
  3. * @author ...
  4. */
  5.  
  6. #include "crossroad.h"
  7.  
  8. Crossroad::Crossroad() {
  9. f = EAST;
  10. t = WEST;
  11. }
  12.  
  13. void Crossroad::setMainroad(Direction from, Direction to){
  14. if (from != to) {
  15. f = from;
  16. t = to;
  17. }
  18. }
  19.  
  20. bool Crossroad::isMainroad(Direction d) const {
  21. if (f == d || t == d) return true;
  22. else return false;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement