lib/engine/game/g_1862/game.rb
# adjust end of set of routes to neighbor node if end is an offboard
adjust end of set of routes to neighbor node if end is an offboard
adjust end of set of routes to neighbor node if end is an offboard
def adjust_end(set, setend)
          return setend unless setend.offboard?
          end_route = set.find { |r| r.visited_stops.include?(setend) }
          end_chain = end_route.chains.find { |c| c[:nodes].include?(setend) }
          end_chain[:nodes].find { |n| n != setend }
        end
def adjust_end ( set , setend ) return setend unless setend . offboard? end_route = set . find { | r | r . visited_stops . include? ( setend ) } end_chain = end_route . chains . find { | c | c [ :nodes ] . include? ( setend ) } end_chain [ :nodes ] . find { | n | n != setend } end
adjust end of set of routes to neighbor node if end is an offboard
adjust end of set of routes to neighbor node if end is an offboard
# find route in set that has this end # find chain in route that has this end # return other node in chain
set
<not_specific>
setend
<not_specific>