Skip to content

Commit c15a8a0

Browse files
committed
reverse switch order, thanks hq
1 parent da52869 commit c15a8a0

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

lib/location.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ def switch_locations(t, n):
126126
y = t.y_start + (t.width / n) / 2 * i - padding
127127
locations.append((even(x), even(y)))
128128

129-
locations.reverse()
130129
return locations
131130

132131

tests/TestSeatmap.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ def testSwitchLocation(self):
8282
switches[0].name,
8383
"b19-a.event.dreamhack.local",
8484
"Wrong switch name")
85-
self.assertEquals(switches[0].x, 114, "Wrong x coordinate")
85+
self.assertEquals(switches[0].x, 38, "Wrong x coordinate")
8686
self.assertEquals(switches[0].y, -4, "Wrong y coordinate")
8787
self.assertEquals(switches[0].table_name, "B19", "Wrong table name")
8888

8989
self.assertEquals(
9090
switches[1].name,
9191
"b19-b.event.dreamhack.local",
9292
"Wrong switch name")
93-
self.assertEquals(switches[1].x, 38, "Wrong x coordinate")
93+
self.assertEquals(switches[1].x, 114, "Wrong x coordinate")
9494
self.assertEquals(switches[1].y, -4, "Wrong y coordinate")
9595
self.assertEquals(switches[1].table_name, "B19", "Wrong table name")
9696

@@ -106,7 +106,7 @@ def testSwitchLocationWithMixedLayout(self):
106106
"c19-a.event.dreamhack.local",
107107
"Wrong switch name")
108108
self.assertEquals(switches[0].x, -2, "Wrong x coordinate")
109-
self.assertEquals(switches[0].y, 130, "Wrong y coordinate")
109+
self.assertEquals(switches[0].y, 24, "Wrong y coordinate")
110110
self.assertEquals(switches[0].table_name, "C19", "Wrong table name")
111111

112112
self.assertEquals(
@@ -122,22 +122,22 @@ def testSwitchLocationWithMixedLayout(self):
122122
"c19-c.event.dreamhack.local",
123123
"Wrong switch name")
124124
self.assertEquals(switches[2].x, -2, "Wrong x coordinate")
125-
self.assertEquals(switches[2].y, 24, "Wrong y coordinate")
125+
self.assertEquals(switches[2].y, 130, "Wrong y coordinate")
126126
self.assertEquals(switches[2].table_name, "C19", "Wrong table name")
127127

128128
self.assertEquals(
129129
switches[3].name,
130130
"b19-a.event.dreamhack.local",
131131
"Wrong switch name")
132-
self.assertEquals(switches[3].x, 118, "Wrong x coordinate")
132+
self.assertEquals(switches[3].x, 40, "Wrong x coordinate")
133133
self.assertEquals(switches[3].y, -4, "Wrong y coordinate")
134134
self.assertEquals(switches[3].table_name, "B19", "Wrong table name")
135135

136136
self.assertEquals(
137137
switches[4].name,
138138
"b19-b.event.dreamhack.local",
139139
"Wrong switch name")
140-
self.assertEquals(switches[4].x, 40, "Wrong x coordinate")
140+
self.assertEquals(switches[4].x, 118, "Wrong x coordinate")
141141
self.assertEquals(switches[4].y, -4, "Wrong y coordinate")
142142
self.assertEquals(switches[4].table_name, "B19", "Wrong table name")
143143

0 commit comments

Comments
 (0)