
from road import Road


class Trunk(Road):
    def __init__(self, name=None):
        super(Trunk, self).__init__(name)
        self.add_lane(2)
        self.add_lane(-2)

    def accept(self, generator):
        generator.start_trunk(self)
        for lane in self.lanes():
            lane.accept(generator)
        generator.end_trunk(self)


from road import Road


class Trunk(Road):
    def __init__(self, name=None):
        super(Trunk, self).__init__(name)
        self.add_lane(2)
        self.add_lane(-2, reversed=True)

    def accept(self, generator):
        generator.start_trunk(self)
        for lane in self.lanes():
            lane.accept(generator)
        generator.end_trunk(self)

Make Trunks have opposite directions in the included lanes
Make Trunks have opposite directions in the included lanes

  
  from road import Road
  
  
  class Trunk(Road):
      def __init__(self, name=None):
          super(Trunk, self).__init__(name)
          self.add_lane(2)
-         self.add_lane(-2)
+         self.add_lane(-2, reversed=True)
  
      def accept(self, generator):
          generator.start_trunk(self)
          for lane in self.lanes():
              lane.accept(generator)
          generator.end_trunk(self)
  
Make Trunks have opposite directions in the included lanes
## Code Before:

from road import Road


class Trunk(Road):
    def __init__(self, name=None):
        super(Trunk, self).__init__(name)
        self.add_lane(2)
        self.add_lane(-2)

    def accept(self, generator):
        generator.start_trunk(self)
        for lane in self.lanes():
            lane.accept(generator)
        generator.end_trunk(self)

## Instruction:
Make Trunks have opposite directions in the included lanes
## Code After:

from road import Road


class Trunk(Road):
    def __init__(self, name=None):
        super(Trunk, self).__init__(name)
        self.add_lane(2)
        self.add_lane(-2, reversed=True)

    def accept(self, generator):
        generator.start_trunk(self)
        for lane in self.lanes():
            lane.accept(generator)
        generator.end_trunk(self)
