Пример #1
0
# pays the big blind.
#
game.beginTurn(1)
#
# PLAYER4 calls under the gun
#
game.call(PLAYER4)
#
# The dealer and small blind fold
#
game.fold(PLAYER1)
game.fold(PLAYER2)
#
# The big blind checks
#
game.check(PLAYER3)
#
# PLAYER3 and PLAYER4 check the flop
#
game.check(PLAYER3)
game.check(PLAYER4)
#
# PLAYER3 and PLAYER4 check the turn
#
game.check(PLAYER3)
game.check(PLAYER4)
#
# PLAYER3 and PLAYER4 check the river
#
game.check(PLAYER3)
game.check(PLAYER4)
Пример #2
0
game.beginTurn(1)
#game.botPlayer(PLAYER1)
game.botPlayer(PLAYER2)
game.botPlayer(PLAYER3)
game.botPlayer(PLAYER4)

import random
while game.possibleActions(PLAYER1):
	actions = game.possibleActions(PLAYER1)
	assert len(actions)
	rnd = random.randint(0, len(actions)-1)
	action = actions[rnd]
	if action == 'fold':
		game.fold(PLAYER1)
	elif action == 'check':
		game.check(PLAYER1)
	elif action == 'call':
		game.call(PLAYER1)
	elif action == 'raise':
		game.callNraise(PLAYER1, 0)
	else:
		raise Exception('unknown action' + action)

'''
#
# PLAYER4 calls under the gun
#
game.call(PLAYER4)
#
# The dealer and small blind fold
#
Пример #3
0
game.beginTurn(1)
#game.botPlayer(PLAYER1)
game.botPlayer(PLAYER2)
game.botPlayer(PLAYER3)
game.botPlayer(PLAYER4)

import random
while game.possibleActions(PLAYER1):
    actions = game.possibleActions(PLAYER1)
    assert len(actions)
    rnd = random.randint(0, len(actions) - 1)
    action = actions[rnd]
    if action == 'fold':
        game.fold(PLAYER1)
    elif action == 'check':
        game.check(PLAYER1)
    elif action == 'call':
        game.call(PLAYER1)
    elif action == 'raise':
        game.callNraise(PLAYER1, 0)
    else:
        raise Exception('unknown action' + action)
'''
#
# PLAYER4 calls under the gun
#
game.call(PLAYER4)
#
# The dealer and small blind fold
#
game.fold(PLAYER1)
Пример #4
0
# pays the big blind.
#
game.beginTurn(1)
#
# PLAYER4 calls under the gun
#
game.call(PLAYER4)
#
# The dealer and small blind fold
#
game.fold(PLAYER1)
game.fold(PLAYER2)
#
# The big blind checks
#
game.check(PLAYER3)
#
# PLAYER3 and PLAYER4 check the flop
#
game.check(PLAYER3)
game.check(PLAYER4)
#
# PLAYER3 and PLAYER4 check the turn
#
game.check(PLAYER3)
game.check(PLAYER4)
#
# PLAYER3 and PLAYER4 check the river
#
game.check(PLAYER3)
game.check(PLAYER4)