5 #import psyco; psyco.full()
8 blinds = [1,2,4,8,16,25,37,50]
11 # Command line arguments
14 try : A = player(sys.argv[1],sys.argv[1])
15 except: A = player('Meg')
16 try : B = player(sys.argv[2], sys.argv[2])
17 except: B = player('Jack')
18 try : tournament_N = int(sys.argv[3])
19 except: tournament_N = 1
22 for n in xrange(tournament_N):
28 while A.cash > 0 and B.cash > 0:
31 if hand_count % hand_clock==0:
32 b = b+1 if b < len(blinds)-1 else len(blinds)-1
34 GLOBAL_TXT = gameplay(DECK, P[0],P[1], blinds[b])
36 # Allow the players to view the end result
37 board = [DECK[n] for n in xrange(4,9)]
38 flop,turn,river = board[:3], board[3:4], board[4:5]
39 if not A.FOLD and not B.FOLD:
40 GP("INFO ",A.name, pp_hand(A.hole), pp_score(A), ' ',A.cash)
41 GP("INFO ",B.name, pp_hand(B.hole), pp_score(B), ' ',B.cash)
42 GP("INFO GAMEOVER ", hand_count)
45 p.GP_FLUSH(returnGP())
49 if not A.brain or not B.brain: # or True:
50 for g in GLOBAL_TXT: print g
51 print "INFO BOARD ", pp_hand([DECK[n] for n in xrange(4,9)])
53 P = [P[-1]] + P[:-1] # Cycle the player order
55 if A.cash: print A.name, hand_count
56 else : print B.name, hand_count
59 if p.brain: p.die() # Kill the players!