Coverage for PokerStarsStructures.py: 0%

15 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-09-28 16:41 +0000

1#!/usr/bin/env python 

2# -*- coding: utf-8 -*- 

3# 

4# Copyright 2010-2013, Chaz Littlejohn 

5#  

6# This program is free software; you can redistribute it and/or modify 

7# it under the terms of the GNU General Public License as published by 

8# the Free Software Foundation; either version 2 of the License, or 

9# (at your option) any later version. 

10#  

11# This program is distributed in the hope that it will be useful, 

12# but WITHOUT ANY WARRANTY; without even the implied warranty of 

13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 

14# GNU General Public License for more details. 

15#  

16# You should have received a copy of the GNU General Public License 

17# along with this program; if not, write to the Free Software 

18# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 

19 

20######################################################################## 

21 

22 

23 

24from datetime import datetime 

25import pytz 

26 

27class PokerStarsStructures(object): 

28 

29 def __init__(self): 

30 self.versions = [pytz.utc.localize(datetime.strptime(d, "%Y/%m/%d %H:%M:%S")) for d in ("2011/05/05 00:00:00","2011/05/20 00:00:00")] 

31 self.versions.append(datetime.utcnow().replace(tzinfo = pytz.utc)) 

32 self.SnG_Structures = [] 

33 self.SnG_Structures.append({(150, 25, 9): 'Turbo', #7-10 handed, under 45 entrants 

34 #Not unique (300, 40, 9): 'Turbo', #7-10 handed, under 45 entrants 

35 (600, 50, 9): 'Turbo', #7-10 handed, under 45 entrants 

36 (1500, 100, 9): 'Turbo', #7-10 handed, under 45 entrants 

37 (2500, 200, 9): 'Turbo', #7-10 handed, under 45 entrants 

38 (3500, 300, 9): 'Turbo', #7-10 handed, under 45 entrants 

39 (5500, 500, 9): 'Turbo', #7-10 handed, under 45 entrants 

40 (10492, 908, 9): 'Turbo', #7-10 handed, under 45 entrants 

41 (21000, 1500, 9): 'Turbo', #7-10 handed, under 45 entrants 

42 (32500, 2000, 9): 'Turbo', #7-10 handed, under 45 entrants 

43 (52500, 3000, 9): 'Turbo', #7-10 handed, under 45 entrants 

44 (105000, 5000, 9): 'Turbo', #7-10 handed, under 45 entrants 

45 (210000, 9000, 9): 'Turbo', #7-10 handed, under 45 entrants 

46 (100, 20, 9): 'Normal', #7-10 handed, under 45 entrants 

47 (300, 40, 9): 'Normal', #7-10 handed, under 45 entrants #Not unique 

48 (545, 55, 9): 'Normal', #7-10 handed, under 45 entrants 

49 (1000, 100, 9): 'Normal', #7-10 handed, under 45 entrants 

50 (2000, 200, 9): 'Normal', #7-10 handed, under 45 entrants 

51 (3000, 300, 9): 'Normal', #7-10 handed, under 45 entrants 

52 (5000, 500, 9): 'Normal', #7-10 handed, under 45 entrants 

53 (10000, 900, 9): 'Normal', #7-10 handed, under 45 entrants 

54 (20000, 1500, 9): 'Normal', #7-10 handed, under 45 entrants 

55 (30000, 2000, 9): 'Normal', #7-10 handed, under 45 entrants 

56 (50000, 3000, 9): 'Normal', #7-10 handed, under 45 entrants 

57 (100000, 5000, 9): 'Normal', #7-10 handed, under 45 entrants 

58 (200000, 9000, 9): 'Normal', #7-10 handed, under 45 entrants 

59 (300, 25, 6): 'Turbo', #6-handed, Under 30 Entrants 

60 #Not unique (600, 60, 6): 'Turbo', #6-handed, Under 30 Entrants 

61 #Not unique (1200, 100, 6): 'Turbo', #6-handed, Under 30 Entrants 

62 #Not unique (2300, 200, 6): 'Turbo', #6-handed, Under 30 Entrants 

63 (3600, 300, 6): 'Turbo', #6-handed, Under 30 Entrants 

64 (5500, 500, 6): 'Turbo', #6-handed, Under 30 Entrants 

65 (7200, 600, 6): 'Turbo', #6-handed, Under 30 Entrants 

66 (11000, 900, 6): 'Turbo', #6-handed, Under 30 Entrants 

67 (22000, 1500, 6): 'Turbo', #6-handed, Under 30 Entrants 

68 (53500, 3000, 6): 'Turbo', #6-handed, Under 30 Entrants 

69 (106000, 5000, 6): 'Turbo', #6-handed, Under 30 Entrants 

70 (100, 20, 6): 'Normal', #6-handed, Under 30 Entrants 

71 (300, 40, 6): 'Normal', #6-handed, Under 30 Entrants 

72 (600, 60, 6): 'Normal', #6-handed, Under 30 Entrants #Not unique 

73 (1200, 100, 6): 'Normal', #6-handed, Under 30 Entrants #Not unique 

74 (2300, 200, 6): 'Normal', #6-handed, Under 30 Entrants #Not unique 

75 (3500, 300, 6): 'Normal', #6-handed, Under 30 Entrants 

76 (5060, 440, 6): 'Normal', #6-handed, Under 30 Entrants 

77 (7000, 600, 6): 'Normal', #6-handed, Under 30 Entrants 

78 (11200, 900, 6): 'Normal', #6-handed, Under 30 Entrants 

79 (30500, 2000, 6): 'Normal', #6-handed, Under 30 Entrants 

80 (600, 25, 2): 'Turbo', #Heads Up 

81 (1100, 50, 2): 'Turbo', #Heads Up 

82 (2200, 100, 2): 'Turbo', #Heads Up 

83 (3300, 150, 2): 'Turbo', #Heads Up 

84 (5500, 250, 2): 'Turbo', #Heads Up 

85 (11000, 500, 2): 'Turbo', #Heads Up 

86 (22000, 1000, 2): 'Turbo', #Heads Up 

87 (33000, 1500, 2): 'Turbo', #Heads Up 

88 (55000, 2000, 2): 'Turbo', #Heads Up 

89 (110000, 3000, 2): 'Turbo', #Heads Up 

90 (220000, 5000, 2): 'Turbo', #Heads Up 

91 (550000, 10000, 2): 'Turbo', #Heads Up 

92 (200, 20, 2): 'Normal', #Heads Up 

93 (500, 25, 2): 'Normal', #Heads Up 

94 (1000, 50, 2): 'Normal', #Heads Up 

95 (2000, 100, 2): 'Normal', #Heads Up 

96 (3000, 150, 2): 'Normal', #Heads Up 

97 (5000, 250, 2): 'Normal', #Heads Up 

98 (10000, 500, 2): 'Normal', #Heads Up 

99 (20000, 1000, 2): 'Normal', #Heads Up 

100 (30000, 1500, 2): 'Normal', #Heads Up 

101 (50000, 2000, 2): 'Normal', #Heads Up 

102 (100000, 3000, 2): 'Normal', #Heads Up 

103 (200000, 5000, 2): 'Normal', #Heads Up 

104 (500000, 10000, 2): 'Normal', #Heads Up 

105 (50, 5, 45): 'Turbo', #45 Entrants 

106 (100, 10, 45): 'Turbo', #45 Entrants 

107 (300, 25, 45): 'Turbo', #45 Entrants 

108 (600, 50, 45): 'Turbo', #45 Entrants 

109 (1100, 100, 45): 'Turbo', #45 Entrants 

110 (2500, 200, 45): 'Turbo', #45 Entrants 

111 (3500, 300, 45): 'Turbo', #45 Entrants 

112 (5500, 500, 45): 'Turbo', #45 Entrants 

113 (10500, 900, 45): 'Turbo', #45 Entrants 

114 (25, 0, 45): 'Normal', #45 Entrants 

115 (100, 20, 45): 'Normal', #45 Entrants 

116 (500, 50, 45): 'Normal', #45 Entrants 

117 (1000, 100, 45): 'Normal', #45 Entrants 

118 (2000, 200, 45): 'Normal', #45 Entrants 

119 (50, 5, 90): 'Turbo', #90 Entrants 

120 (100, 10, 90): 'Turbo', #90 Entrants 

121 (300, 25, 90): 'Turbo', #90 Entrants 

122 (600, 50, 90): 'Turbo', #90 Entrants 

123 (1100, 100, 90): 'Turbo', #90 Entrants 

124 (5500, 500, 90): 'Turbo', #90 Entrants 

125 (100, 8, 10): 'Turbo', #Fifty50 

126 (500, 24, 10): 'Turbo', #Fifty50 

127 (1000, 48, 10): 'Turbo', #Fifty50 

128 (2000, 96, 10): 'Turbo', #Fifty50 

129 (3000, 144, 10): 'Turbo', #Fifty50 

130 (5000, 240, 10): 'Turbo', #Fifty50 

131 (10000, 430, 10): 'Turbo', #Fifty50 

132 (100, 11, 10): 'Normal', #Fifty50 

133 (500, 30, 10): 'Normal', #Fifty50 

134 (1000, 60, 10): 'Normal', #Fifty50 

135 (2000, 120, 10): 'Normal', #Fifty50 

136 (3000, 180, 10): 'Normal', #Fifty50 

137 (5000, 300, 10): 'Normal', #Fifty50 

138 (10000, 540, 10): 'Normal', #Fifty50 

139 (25, 0, 90): 'Normal', #90 Entrants 

140 (200, 20, 90): 'Normal', #90 Entrants 

141 (500, 50, 90): 'Normal', #90 Entrants 

142 (800, 80, 90): 'Normal', #90 Entrants 

143 (200, 20, 180): 'Turbo', #180 Entrants 

144 (700, 70, 180): 'Turbo', #180 Entrants 

145 (1100, 100, 180): 'Turbo', #180 Entrants 

146 (3300, 300, 180): 'Turbo', #180 Entrants 

147 (400, 40, 180): 'Normal', #180 Entrants 

148 (1000, 100, 180): 'Normal', #180 Entrants 

149 (2000, 200, 180): 'Normal', #180 Entrants 

150 (125, 10, 27): 'Normal', #27 Player Knockout 

151 (125, 15, 90): 'Normal', #90 Player Knockout 

152 (625, 50, 90): 'Normal', #90 Player Knockout 

153 (1250, 100, 90): 'Normal', #90 Player Knockout 

154 (300, 30, 180): 'Normal', #180 Player Rebuy 

155 }) 

156 self.SnG_Structures.append({ 

157 (100, 8, 9, 9): 'Hyper', #7-10 handed, under 45 entrants 

158 (500, 23, 9, 9): 'Hyper', #7-10 handed, under 45 entrants 

159 (500, 21, 6, 6): 'Hyper', #6-handed, Under 45 Entrants 

160 (500, 11, 2, 2): 'Hyper', #Heads Up 

161 }) 

162 self.SnG_Structures.append({(132, 18, 9): 'Turbo', #7-10 handed, under 45 entrants 

163 (316, 34, 9): 'Turbo', #7-10 handed, under 45 entrants 

164 (645, 55, 9): 'Turbo', #7-10 handed, under 45 entrants 

165 (1389, 111, 9): 'Turbo', #7-10 handed, under 45 entrants 

166 (2778, 222, 9): 'Turbo', #7-10 handed, under 45 entrants 

167 (5556, 444, 9): 'Turbo', #7-10 handed, under 45 entrants 

168 (9280, 720, 9): 'Turbo', #7-10 handed, under 45 entrants 

169 (18780, 1220, 9): 'Turbo', #7-10 handed, under 45 entrants 

170 (28300, 1700, 9): 'Turbo', #7-10 handed, under 45 entrants 

171 (47400, 2600, 9): 'Turbo', #7-10 handed, under 45 entrants 

172 (95700, 4300, 9): 'Turbo', #7-10 handed, under 45 entrants 

173 (192300, 7700, 9): 'Turbo', #7-10 handed, under 45 entrants 

174 (129, 21, 9): 'Normal', #7-10 handed, under 45 entrants 

175 (311, 39, 9): 'Normal', #7-10 handed, under 45 entrants 

176 (637, 63, 9): 'Normal', #7-10 handed, under 45 entrants 

177 (1370, 130, 9): 'Normal', #7-10 handed, under 45 entrants 

178 (2740, 260, 9): 'Normal', #7-10 handed, under 45 entrants 

179 (5480, 520, 9): 'Normal', #7-10 handed, under 45 entrants 

180 (9215, 785, 9): 'Normal', #7-10 handed, under 45 entrants 

181 (18650, 1350, 9): 'Normal', #7-10 handed, under 45 entrants 

182 (28100, 1900, 9): 'Normal', #7-10 handed, under 45 entrants 

183 (47175, 2825, 9): 'Normal', #7-10 handed, under 45 entrants 

184 (132, 18, 6): 'Turbo', #6-handed, Under 30 Entrants 

185 (319, 31, 6): 'Turbo', #6-handed, Under 30 Entrants 

186 (648, 52, 6): 'Turbo', #6-handed, Under 30 Entrants 

187 (1392, 108, 6): 'Turbo', #6-handed, Under 30 Entrants 

188 (2784, 216, 6): 'Turbo', #6-handed, Under 30 Entrants 

189 (5568, 432, 6): 'Turbo', #6-handed, Under 30 Entrants 

190 (9325, 675, 6): 'Turbo', #6-handed, Under 30 Entrants 

191 (18820, 1180, 6): 'Turbo', #6-handed, Under 30 Entrants 

192 (28370, 1630, 6): 'Turbo', #6-handed, Under 30 Entrants 

193 (47500, 2500, 6): 'Turbo', #6-handed, Under 30 Entrants 

194 (96000, 4000, 6): 'Turbo', #6-handed, Under 30 Entrants 

195 (192800, 7200, 6): 'Turbo', #6-handed, Under 30 Entrants 

196 (129, 21, 6): 'Normal', #6-handed, Under 30 Entrants 

197 (313, 37, 6): 'Normal', #6-handed, Under 30 Entrants 

198 (639, 61, 6): 'Normal', #6-handed, Under 30 Entrants 

199 (1379, 121, 6): 'Normal', #6-handed, Under 30 Entrants 

200 (2758, 242, 6): 'Normal', #6-handed, Under 30 Entrants 

201 (5516, 484, 6): 'Normal', #6-handed, Under 30 Entrants 

202 (9260, 740, 6): 'Normal', #6-handed, Under 30 Entrants 

203 (18690, 1310, 6): 'Normal', #6-handed, Under 30 Entrants 

204 (28170, 1830, 6): 'Normal', #6-handed, Under 30 Entrants 

205 (47275, 2725, 6): 'Normal', #6-handed, Under 30 Entrants 

206 (140, 10, 2): 'Turbo', #Heads Up 

207 (332, 18, 2): 'Turbo', #Heads Up 

208 (671, 29, 2): 'Turbo', #Heads Up 

209 (1439, 61, 2): 'Turbo', #Heads Up 

210 (2878, 122, 2): 'Turbo', #Heads Up 

211 (5767, 233, 2): 'Turbo', #Heads Up 

212 (9632, 368, 2): 'Turbo', #Heads Up 

213 (19385, 615, 2): 'Turbo', #Heads Up 

214 (29125, 875, 2): 'Turbo', #Heads Up 

215 (48760, 1240, 2): 'Turbo', #Heads Up 

216 (97920, 2080, 2): 'Turbo', #Heads Up 

217 (196250, 3750, 2): 'Turbo', #Heads Up 

218 (493700, 6300, 2): 'Turbo', #Heads Up 

219 (138, 12, 2): 'Normal', #Heads Up 

220 (329, 21, 2): 'Normal', #Heads Up 

221 (667, 33, 2): 'Normal', #Heads Up 

222 (1429, 71, 2): 'Normal', #Heads Up 

223 (2857, 143, 2): 'Normal', #Heads Up 

224 (5728, 272, 2): 'Normal', #Heads Up 

225 (9569, 431, 2): 'Normal', #Heads Up 

226 (19275, 725, 2): 'Normal', #Heads Up 

227 (28985, 1015, 2): 'Normal', #Heads Up 

228 (48540, 1460, 2): 'Normal', #Heads Up 

229 (97560, 2440, 2): 'Normal', #Heads Up 

230 (195600, 4400, 2): 'Normal', #Heads Up 

231 (492600, 7400, 2): 'Normal', #Heads Up 

232 (45, 5, 45): 'Turbo', #45 Entrants 

233 (136, 14, 45): 'Turbo', #45 Entrants 

234 (319, 31, 45): 'Turbo', #45 Entrants 

235 (918, 82, 45): 'Turbo', #45 Entrants 

236 (2765, 235, 45): 'Turbo', #45 Entrants 

237 (136, 14, 48): 'Turbo', #48 Entrants 

238 (136, 14, 36): 'Turbo', #36 Entrants 

239 (23, 2, 45): 'Normal', #45 Entrants 

240 (91, 9, 45): 'Normal', #45 Entrants 

241 (546, 54, 45): 'Normal', #45 Entrants 

242 (45, 5, 90): 'Turbo', #90 Entrants 

243 (91, 9, 90): 'Turbo', #90 Entrants 

244 (139, 11, 10): 'Turbo', #Fifty50 

245 (330, 20, 10): 'Turbo', #Fifty50 

246 (668, 32, 10): 'Turbo', #Fifty50 

247 (1431, 69, 10): 'Turbo', #Fifty50 

248 (2863, 137, 10): 'Turbo', #Fifty50 

249 (5725, 275, 10): 'Turbo', #Fifty50 

250 (9586, 414, 10): 'Turbo', #Fifty50 

251 (19305, 695, 10): 'Turbo', #Fifty50 

252 (29160, 840, 10): 'Turbo', #Fifty50 

253 (48720, 1280, 10): 'Turbo', #Fifty50 

254 (135, 15, 10): 'Normal', #Fifty50 

255 (326, 24, 10): 'Normal', #Fifty50 

256 (660, 40, 10): 'Normal', #Fifty50 

257 (1415, 85, 10): 'Normal', #Fifty50 

258 (2830, 170, 10): 'Normal', #Fifty50 

259 (5660, 340, 10): 'Normal', #Fifty50 

260 (9490, 510, 10): 'Normal', #Fifty50 

261 (19135, 865, 10): 'Normal', #Fifty50 

262 (23, 2, 90): 'Normal', #90 Entrants 

263 (228, 22, 90): 'Normal', #90 Entrants 

264 (228, 22, 180): 'Turbo', #180 Entrants 

265 (734, 66, 180): 'Turbo', #180 Entrants 

266 (1377, 123, 180): 'Turbo', #180 Entrants 

267 (3213, 287, 180): 'Turbo', #180 Entrants 

268 (410, 40, 180): 'Normal', #180 Entrants 

269 (1005, 95, 180): 'Normal', #180 Entrants 

270 (9, 1, 240): 'Normal', #240 Entrants 

271 (9, 1, 360): 'Turbo', #360 Entrants 

272 (45, 5, 360): 'Turbo', #360 Entrants 

273 (135, 15, 90): 'Normal', #90 Player Knockout 

274 (650, 50, 90): 'Normal', #90 Player Knockout 

275 (319, 31, 180): 'Normal', #180 Player Rebuy 

276 (139, 11, 9): 'Hyper', #7-10 handed, under 45 entrants 

277 (331, 19, 9): 'Hyper', #7-10 handed, under 45 entrants 

278 (670, 30, 9): 'Hyper', #7-10 handed, under 45 entrants 

279 (1439, 61, 9): 'Hyper', #7-10 handed, under 45 entrants 

280 (2877, 123, 9): 'Hyper', #7-10 handed, under 45 entrants 

281 (5754, 246, 9): 'Hyper', #7-10 handed, under 45 entrants 

282 (9632, 368, 9): 'Hyper', #7-10 handed, under 45 entrants 

283 (19318, 682, 9): 'Hyper', #7-10 handed, under 45 entrants 

284 (140, 10, 6): 'Hyper', #6-handed, Under 30 Entrants 

285 (332, 18, 6): 'Hyper', #6-handed, Under 30 Entrants 

286 (671, 29, 6): 'Hyper', #6-handed, Under 30 Entrants 

287 (1441, 59, 6): 'Hyper', #6-handed, Under 30 Entrants 

288 (2883, 117, 6): 'Hyper', #6-handed, Under 30 Entrants 

289 (5766, 234, 6): 'Hyper', #6-handed, Under 30 Entrants 

290 (9649, 351, 6): 'Hyper', #6-handed, Under 30 Entrants 

291 (19352, 648, 6): 'Hyper', #6-handed, Under 30 Entrants 

292 (29140, 860, 6): 'Hyper', #6-handed, Under 30 Entrants 

293 (48752, 1248, 6): 'Hyper', #6-handed, Under 30 Entrants 

294 (144, 6, 2): 'Hyper', #Heads Up 

295 (340, 10, 2): 'Hyper', #Heads Up 

296 (685, 15, 2): 'Hyper', #Heads Up 

297 (1469, 31, 2): 'Hyper', #Heads Up 

298 (2937, 63, 2): 'Hyper', #Heads Up 

299 (5874, 126, 2): 'Hyper', #Heads Up 

300 (9812, 188, 2): 'Hyper', #Heads Up 

301 (19666, 334, 2): 'Hyper', #Heads Up 

302 (29551, 449, 2): 'Hyper', #Heads Up 

303 (49335, 665, 2): 'Hyper', #Heads Up 

304 (98880, 1120, 2): 'Hyper', #Heads Up 

305 (91, 9, 180): 'Hyper', #180 Entrants 

306 (2, 0, 990): 'Hyper', #990 Entrants 

307 }) 

308 

309 def lookupSnG(self, key, startTime): 

310 for i in range(len(self.versions)): 

311 if startTime < self.versions[i]: 

312 struct = self.SnG_Structures[i].get(key) 

313 return struct 

314 

315 

316