Class: UsaMap

Inherits:
MapObject show all
Defined in:
lib/ttr/objects/usa_map.rb

Overview

Copyright © 2011 Jesse Sielaff

Instance Method Summary collapse

Methods inherited from MapObject

#city, inherited, #initialize, #new_game, #route, #ticket

Constructor Details

This class inherits a constructor from MapObject

Instance Method Details

#buildObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/ttr/objects/usa_map.rb', line 7

def build
  atlanta, boston, calgary, charleston, chicago, dallas, denver, duluth,
    el_paso, helena, houston, kansas_city, las_vegas, little_rock,
    los_angeles, miami, montreal, nashville, new_orleans, new_york,
    oklahoma_city, omaha, phoenix, pittsburgh, portland, raleigh, st_louis,
    salt_lake_city, san_francisco, santa_fe, sault_ste_marie, seattle,
    toronto, vancouver, washington, winnipeg = %w:
  Atlanta  Boston  Calgary  Charleston  Chicago  Dallas  Denver  Duluth
    El\ Paso  Helena  Houston  Kansas\ City  Las\ Vegas  Little\ Rock
    Los\ Angeles  Miami  Montreal  Nashville  New\ Orleans  New\ York
    Oklahoma\ City  Omaha  Phoenix  Pittsburgh  Portland  Raleigh  St\ Louis
    Salt\ Lake\ City  San\ Francisco  Santa\ Fe  Sault\ Ste\ Marie  Seattle
    Toronto  Vancouver  Washington  Winnipeg
  :.map {|name| city(name) }
  
  ticket(4, denver, el_paso)
  ticket(5, kansas_city, houston)
  ticket(6, new_york, atlanta)
  ticket(7, calgary, salt_lake_city)
  ticket(7, chicago, new_orleans)
  ticket(8, duluth, houston)
  ticket(8, helena, los_angeles)
  ticket(8, sault_ste_marie, nashville)
  ticket(9, sault_ste_marie, oklahoma_city)
  ticket(9, montreal, atlanta)
  ticket(9, seattle, los_angeles)
  ticket(9, chicago, santa_fe)
  ticket(10, toronto, miami)
  ticket(10, duluth, el_paso)
  ticket(11, winnipeg, little_rock)
  ticket(11, dallas, new_york)
  ticket(11, portland, phoenix)
  ticket(11, denver, pittsburgh)
  ticket(12, boston, miami)
  ticket(12, winnipeg, houston)
  ticket(13, montreal, new_orleans)
  ticket(13, calgary, phoenix)
  ticket(13, vancouver, santa_fe)
  ticket(16, los_angeles, chicago)
  ticket(17, san_francisco, atlanta)
  ticket(17, portland, nashville)
  ticket(20, los_angeles, miami)
  ticket(20, vancouver, montreal)
  ticket(21, los_angeles, new_york)
  ticket(22, seattle, new_york)
  
  route(denver, helena, 4, :green)
  route(denver, kansas_city, 4, :black)
  route(denver, kansas_city, 4, :orange)
  route(denver, omaha, 4, :pink)
  route(denver, oklahoma_city, 4, :red)
  route(denver, phoenix, 5, :white)
  route(denver, santa_fe, 2, :grey)
  route(denver, salt_lake_city, 3, :red)
  route(denver, salt_lake_city, 3, :yellow)
  
  route(pittsburgh, chicago, 3, :orange)
  route(pittsburgh, chicago, 3, :black)
  route(pittsburgh, new_york, 2, :white)
  route(pittsburgh, new_york, 2, :green)
  route(pittsburgh, nashville, 4, :yellow)
  route(pittsburgh, raleigh, 2, :grey)
  route(pittsburgh, st_louis, 5, :green)
  route(pittsburgh, toronto, 2, :grey)
  route(pittsburgh, washington, 2, :grey)
  
  route(atlanta, charleston, 2, :grey)
  route(atlanta, miami, 5, :blue)
  route(atlanta, nashville, 1, :grey)
  route(atlanta, new_orleans, 4, :yellow)
  route(atlanta, new_orleans, 4, :orange)
  route(atlanta, raleigh, 2, :grey)
  route(atlanta, raleigh, 2, :grey)
  
  route(duluth, chicago, 3, :red)
  route(duluth, helena, 6, :orange)
  route(duluth, omaha, 2, :grey)
  route(duluth, omaha, 2, :grey)
  route(duluth, sault_ste_marie, 3, :grey)
  route(duluth, toronto, 6, :pink)
  route(duluth, winnipeg, 4, :black)
  
  route(dallas, el_paso, 4, :red)
  route(dallas, houston, 1, :grey)
  route(dallas, houston, 1, :grey)
  route(dallas, little_rock, 2, :grey)
  route(dallas, oklahoma_city, 2, :grey)
  route(dallas, oklahoma_city, 2, :grey)
  
  route(kansas_city, omaha, 1, :grey)
  route(kansas_city, omaha, 1, :grey)
  route(kansas_city, oklahoma_city, 2, :grey)
  route(kansas_city, oklahoma_city, 2, :grey)
  route(kansas_city, st_louis, 2, :blue)
  route(kansas_city, st_louis, 2, :pink)
  
  route(san_francisco, los_angeles, 3, :yellow)
  route(san_francisco, los_angeles, 3, :pink)
  route(san_francisco, salt_lake_city, 5, :white)
  route(san_francisco, salt_lake_city, 5, :orange)
  route(san_francisco, portland, 5, :pink)
  route(san_francisco, portland, 5, :green)
  
  route(seattle, calgary, 4, :grey)
  route(seattle, helena, 6, :yellow)
  route(seattle, portland, 1, :grey)
  route(seattle, portland, 1, :grey)
  route(seattle, vancouver, 1, :grey)
  route(seattle, vancouver, 1, :grey)
  
  route(el_paso, houston, 6, :green)
  route(el_paso, los_angeles, 6, :black)
  route(el_paso, oklahoma_city, 5, :yellow)
  route(el_paso, phoenix, 3, :grey)
  route(el_paso, santa_fe, 2, :grey)
  
  route(montreal, boston, 2, :grey)
  route(montreal, boston, 2, :grey)
  route(montreal, new_york, 3, :blue)
  route(montreal, sault_ste_marie, 5, :black)
  route(montreal, toronto, 3, :grey)
  
  route(chicago, omaha, 4, :blue)
  route(chicago, st_louis, 2, :green)
  route(chicago, st_louis, 2, :white)
  route(chicago, toronto, 4, :white)
  
  route(helena, calgary, 4, :grey)
  route(helena, omaha, 5, :red)
  route(helena, salt_lake_city, 3, :pink)
  route(helena, winnipeg, 4, :blue)
  
  route(little_rock, nashville, 3, :white)
  route(little_rock, new_orleans, 3, :green)
  route(little_rock, oklahoma_city, 2, :grey)
  route(little_rock, st_louis, 2, :grey)
  
  route(new_york, boston, 2, :yellow)
  route(new_york, boston, 2, :red)
  route(new_york, washington, 2, :black)
  route(new_york, washington, 2, :orange)
  
  route(raleigh, charleston, 2, :grey)
  route(raleigh, nashville, 3, :black)
  route(raleigh, washington, 2, :grey)
  route(raleigh, washington, 2, :grey)
  
  route(calgary, vancouver, 3, :grey)
  route(calgary, winnipeg, 6, :white)
  
  route(las_vegas, los_angeles, 2, :grey)
  route(las_vegas, salt_lake_city, 3, :orange)
  
  route(miami, charleston, 4, :pink)
  route(miami, new_orleans, 6, :red)
  
  route(phoenix, los_angeles, 3, :grey)
  route(phoenix, santa_fe, 3, :grey)
  
  route(sault_ste_marie, toronto, 2, :grey)
  route(sault_ste_marie, winnipeg, 6, :grey)
  
  route(houston, new_orleans, 2, :grey)
  
  route(nashville, st_louis, 2, :grey)
  
  route(oklahoma_city, santa_fe, 3, :blue)
  
  route(portland, salt_lake_city, 6, :blue)
end