 
     extend: (segment) ->
       if not segment.startpoint.eq(@endpoint)
-        throw Error('IllegalExtendException')
+        console.error("Illegal extend")
+        #throw Error('IllegalExtendException')
       @endpoint = segment.endpoint
 
     truncate: (segment) ->
       if segment.orientation == @orientation
-        throw Error('SameOrientationTruncateException')
+        console.error("Same orientation truncate")
+        #throw Error('SameOrientationTruncateException')
       if segment.orientation == VERTICAL
         @endpoint.x = segment.startpoint.x
       else


      walls_to_search = @walls[orientation_to_search]

      searched = []

      for wall in _.without(@most_recent_walls, null)
        #console.log "Wall: ", wall
        for wall2 in _.without(@most_recent_walls, wall, null, searched...)
          #console.log "Wall2: ", wall2
          if wall.orientation == wall2.orientation
            if (wall.orientation == HORIZONTAL and wall.startpoint.y == wall2.startpoint.y)
              overlap = _.min([_.max([wall.startpoint.x, wall.endpoint.x]), _.max([wall2.startpoint.x, wall2.endpoint.x])]) - _.max([_.min([wall2.startpoint.x, wall2.endpoint.x]), _.min([wall.startpoint.x, wall.endpoint.x])])
            else if (wall.orientation == VERTICAL and wall.startpoint.x == wall2.startpoint.x)
              overlap = _.min([_.max([wall.startpoint.y, wall.endpoint.y]), _.max([wall2.startpoint.y, wall2.endpoint.y])]) - _.max([_.min([wall2.startpoint.y, wall2.endpoint.y]), _.min([wall.startpoint.y, wall.endpoint.y])])

            #console.log "Overlap: ", overlap
            if overlap > 0
              collisions.push([wall, wall2, overlap])
              collisions.push([wall2, wall, overlap])

        searched.push(wall)

      for wall in walls_to_search
        continue if wall.endpoint.x == segment.player.lastPos().x and wall.endpoint.y == segment.player.lastPos().y

    removePlayer: (player) ->
      console.log "Removing player!"
      for wall in @allWalls()
        if wall.player == player
          console.log "Wall gone!"
          @walls[wall.orientation].splice(@walls[wall.orientation].indexOf(wall), 1)

