p103 - reading small blinds now rather than assuming them
This commit is contained in:
parent
c19c933942
commit
005627b9d7
|
@ -4,7 +4,6 @@ Please also see db-todo.txt
|
||||||
alpha4 (release 25Sep-2Oct)
|
alpha4 (release 25Sep-2Oct)
|
||||||
======
|
======
|
||||||
pgsql recreate doesnt work, and it may not store version field on creation if using sql file with pgadmin.
|
pgsql recreate doesnt work, and it may not store version field on creation if using sql file with pgadmin.
|
||||||
reading small blind wrong for PS 25/50ct
|
|
||||||
check we're reading mucked cards from PS
|
check we're reading mucked cards from PS
|
||||||
ebuild: support pgsql
|
ebuild: support pgsql
|
||||||
fix HUD config location and update release script accordingly
|
fix HUD config location and update release script accordingly
|
||||||
|
@ -32,9 +31,9 @@ finish todos in git instructions
|
||||||
debian/ubuntu package http://www.debian.org/doc/maint-guide/ch-start.en.html
|
debian/ubuntu package http://www.debian.org/doc/maint-guide/ch-start.en.html
|
||||||
howto remote DB
|
howto remote DB
|
||||||
move all user docs to webpage
|
move all user docs to webpage
|
||||||
contributor list on webpage
|
(steffen) contributor list on webpage
|
||||||
finish bringing back tourney
|
finish bringing back tourney
|
||||||
No river stats for stud games
|
No river stats for stud games?
|
||||||
hole/board cards are not correctly stored in the db for stud games
|
hole/board cards are not correctly stored in the db for stud games
|
||||||
HORSE (and presumably other mixed games) hand history files not handled correctly
|
HORSE (and presumably other mixed games) hand history files not handled correctly
|
||||||
Some MTTs won't import (rebuys??)
|
Some MTTs won't import (rebuys??)
|
||||||
|
|
|
@ -39,7 +39,14 @@ def mainParser(db, cursor, site, category, hand):
|
||||||
#print "parse logic, siteID:",siteID,"site:",site
|
#print "parse logic, siteID:",siteID,"site:",site
|
||||||
|
|
||||||
isTourney=fpdb_simple.isTourney(hand[0])
|
isTourney=fpdb_simple.isTourney(hand[0])
|
||||||
gametypeID=fpdb_simple.recogniseGametypeID(cursor, hand[0], siteID, category, isTourney)
|
smallBlindLine=0
|
||||||
|
for i in range(len(hand)):
|
||||||
|
if hand[i].find("posts small blind")!=-1 or hand[i].find("posts the small blind")!=-1:
|
||||||
|
smallBlindLine=i
|
||||||
|
#print "found small blind line:",smallBlindLine
|
||||||
|
break
|
||||||
|
#print "small blind line:",smallBlindLine
|
||||||
|
gametypeID=fpdb_simple.recogniseGametypeID(cursor, hand[0], hand[smallBlindLine], siteID, category, isTourney)
|
||||||
if isTourney:
|
if isTourney:
|
||||||
if site!="ps":
|
if site!="ps":
|
||||||
raise fpdb_simple.FpdbError("tourneys are only supported on PS right now")
|
raise fpdb_simple.FpdbError("tourneys are only supported on PS right now")
|
||||||
|
|
|
@ -972,7 +972,7 @@ def recogniseCategory(line):
|
||||||
#end def recogniseCategory
|
#end def recogniseCategory
|
||||||
|
|
||||||
#returns the int for the gametype_id for the given line
|
#returns the int for the gametype_id for the given line
|
||||||
def recogniseGametypeID(cursor, topline, site_id, category, isTourney):#todo: this method is messy
|
def recogniseGametypeID(cursor, topline, smallBlindLine, site_id, category, isTourney):#todo: this method is messy
|
||||||
#if (topline.find("HORSE")!=-1):
|
#if (topline.find("HORSE")!=-1):
|
||||||
# raise FpdbError("recogniseGametypeID: HORSE is not yet supported.")
|
# raise FpdbError("recogniseGametypeID: HORSE is not yet supported.")
|
||||||
|
|
||||||
|
@ -1043,8 +1043,12 @@ def recogniseGametypeID(cursor, topline, site_id, category, isTourney):#todo: th
|
||||||
hiLo='s'
|
hiLo='s'
|
||||||
|
|
||||||
if (limit_type=="fl"):
|
if (limit_type=="fl"):
|
||||||
big_blind=small_bet #todo: read this
|
big_blind=small_bet
|
||||||
small_blind=big_blind/2 #todo: read this
|
if smallBlindLine==topline:
|
||||||
|
raise fpdb_simple.FpdbError("invalid small blind line")
|
||||||
|
else:
|
||||||
|
pos=smallBlindLine.rfind("$")+1
|
||||||
|
small_blind=float2int(smallBlindLine[pos:])
|
||||||
cursor.execute("""INSERT INTO Gametypes
|
cursor.execute("""INSERT INTO Gametypes
|
||||||
(siteId, type, base, category, limitType, hiLo, smallBlind, bigBlind, smallBet, bigBet)
|
(siteId, type, base, category, limitType, hiLo, smallBlind, bigBlind, smallBet, bigBet)
|
||||||
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""", (site_id, type, base, category, limit_type, hiLo, small_blind, big_blind, small_bet, big_bet))
|
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""", (site_id, type, base, category, limit_type, hiLo, small_blind, big_blind, small_bet, big_bet))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user