lib/core/view_container.rb
def forward(vassal_index)
    # If the index is not of the last vassal, return the first view of the
    # next vassal.
    if @vassals.size > vassal_index.next then
      return @vassals[vassal_index.next].view_first
    else
      if @lord.nil? then
        # Return the first view of the first vassal.
        return @vassals[0].view_first
      else
        return @lord.forward(@index)
      end
    end
  end
# A recursive function to move forward in the View hierarchy.
A recursive function to move forward in the View hierarchy.
A recursive function to move forward in the View hierarchy .
def forward(vassal_index)
    if @vassals.size > vassal_index.next then
      return @vassals[vassal_index.next].view_first
    else
      if @lord.nil? then
        return @vassals[0].view_first
      else
        return @lord.forward(@index)
      end
    end
  end
def forward ( vassal_index ) if @vassals . size > vassal_index . next then return @vassals [ vassal_index . next ] . view_first else if @lord . nil? then return @vassals [ 0 ] . view_first else return @lord . forward ( @index ) end end end
A recursive function to move forward in the View hierarchy.
A recursive function to move forward in the View hierarchy .
# If the index is not of the last vassal, return the first view of the # next vassal. # Return the first view of the first vassal.
vassal_index