SE450: Project: Creating the road graph [12/13] Previous pageContentsNext page

The instructions call for an object graph like this:

          30     40
          |      |
          31     41
          |      |
  10--11--A--13--B--15--16
          |      |
          33     43
          |      |
  20--21--C--23--D--25--26
          |      |
          35     45
          |      |
          36     46

Here traffic goes left to right and top to bottom.

The object graph you build will look like this:

CarGen10 -> Road11 -> Light12 -> Road13 -> Light14 -> Road15 -> Sink16

CarGen20 -> Road21 -> Light22 -> Road23 -> Light24 -> Road25 -> Sink26

CarGen30 -> Road31 -> Light32 -> Road33 -> Light34 -> Road35 -> Sink36

CarGen40 -> Road41 -> Light42 -> Road43 -> Light44 -> Road45 -> Sink46

      Light12 <- LightControllerA -> Light32

      Light12 <- LightControllerB -> Light42

      Light22 <- LightControllerC -> Light35

      Light22 <- LightControllerD -> Light45

How do you put all this together?

Previous pageContentsNext page