Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First try #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 57 additions & 2 deletions mbta.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,60 @@

# your solution here
def stops_between_stations
# hash or array?
line_stations = {
red_Line : ["South Station",
"Park Street",
"Kendall",
"Central",
"Harvard",
"Porter",
"Davis",
"Alewife"],
#green_Line : ["Government Center",
#"Park Street",
#"Boylston",
#"Arlington",
#"Copley",
#"Hynes",
#"Kenmore"],
#orange_Line:
#["North Station",
#"Haymarket",
#"Park Street",
#"State",
#"Downtown Crossing",
#"Chinatown",
#"Back Bay",
#"Forest Hills"]
}

end
#def stops_between_stations(fline,fstation,sline,lstation)
# datatype of arguments array,string,array,string
#station_counter_first_line (lines,station) call the function
#if fline == sline && fstation==lstation
#puts return value from station_counter_first_line (lines,station)
#else
#station_counter_second_line (lines,station,total of stations from the first line) call the function
#end

#end


#def station_counter_first_line (lines,station)
# datatype of arguments array,string
#need to loop throw one line and increment counter to calculate the stations
#loop need to be breaked if station == "Park Street"
#return the number of stations


#end

#def station_counter_second_line (slines,lstation,total)
# datatype of arguments array,string
# if station == "Park Street"
#need to loop throw one line and increment counter to calculate the stations and save it in variable
#return number of stations + total



#end