summaryrefslogtreecommitdiff
path: root/blatube_v1.0.0.rb
diff options
context:
space:
mode:
authorotherl <lgdmiller@gmail.com>2013-09-28 19:23:24 +0100
committerotherl <lgdmiller@gmail.com>2013-09-28 19:23:24 +0100
commitc40fe4bf6016e9f2aefac576f6eb24787b8f986f (patch)
treed6a47a60d4d127cc22afcf1053eba45637da1c2f /blatube_v1.0.0.rb
parent727d37c0e04def6a012c7c83f3c3b8ccad78c92f (diff)
Changed colours in the output to be disabled by default.
Diffstat (limited to 'blatube_v1.0.0.rb')
-rw-r--r--blatube_v1.0.0.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/blatube_v1.0.0.rb b/blatube_v1.0.0.rb
index 3fbfb00..0ecd5fb 100644
--- a/blatube_v1.0.0.rb
+++ b/blatube_v1.0.0.rb
@@ -10,7 +10,7 @@ require 'json'
@to_station = nil
@weight = 'peak_time'
@change_time = 5
-@colour = true
+@colour = false
debug = false
help = false
ops = nil
@@ -28,7 +28,7 @@ options = OptionParser.new do |opts|
opts.on( '-t', '--to-station STATION', 'Find route to this station.' ) {|t| @to_station = t }
opts.on( '-w', '--weight WEIGHT', 'Shortest route using either distance, peak_time, off_peak_time or unimpeded_time.' ) {|w| @weight = w if WEIGHTS.include? w || 'peak_time' }
opts.on( '-c', '--change-time TIME', 'Your expected average change time in minutes.' ) {|c| @change_time = c.to_f.round(2) }
- opts.on( '-C', '--no-colour', 'Disable line colours in the output.' ) { @colour = false }
+ opts.on( '-C', '--colour', 'Enable line colours in the output.' ) { @colour = true }
opts.on( '-d', '--debug', 'Display debug info.' ) { debug = true }
opts.on( '-v', '--version', 'blatube version number.' ) { puts VERSION; exit }
opts.on( '-h', '--help', 'Display this screen.' ) { help = true; ops = opts }
@@ -135,10 +135,10 @@ def run_algorithm graph, nodes, start_node
end
def traverse_route to_station
- if @routes[to_station] != -1
- traverse_route @routes[to_station]
- end
- @shortest_route << to_station
+ if @routes[to_station] != -1
+ traverse_route @routes[to_station]
+ end
+ @shortest_route << to_station
end
#TODO: a nicer way of doing this