-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
We discussed with bkuhn the rational of a minimum hand duration in tourney:
- - If a player sit out in tourney he will be put in auto (fold) mode
- - If all the other players not in auto (fold) mode act right away (like
bot do), the next hand will be deal without delay
Which leads to the tourney being completed in a few seconds, introducing
the following undesirable issues:
- - The sitout player has no opportunity to sit back
- - The client of the sitout player will still be playing bufferized hand
packets, even when the tourney shows completed in the tourney listing
- - When there are multiple tables, one table plays much faster
Looking forward to fix this issue:
http://jspoker.pokersource.info/ideas.html#[[the%20hands%20must%20have%20a%2015%20sec%20minimum%20duration]]
I looked at pokertable handling of tournament delays, and noticed that
autodeal_tournament_min is only activated when all players are in auto
(fold) mode. (please keep in mind that active bot are not considered auto).
I believe the attached patch could correct this issue by removing the if
player are all_auto condition, and always introduce
autodeal_tournament_min between tourney hands.
Feel free to post comments before I commit it.
Thanks in advance.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkki4FsACgkQZmEdV9SHoe4z3QCfYIT3Z6xfO9lmbCEctHwjFgmw
zDAAoJNxkvImcHuW9rqkRVuE/FTlfLLC
=Rxms
-----END PGP SIGNATURE-----
Index: pokernetwork/pokertable.py
===================================================================
--- pokernetwork/pokertable.py (revision 4932)
+++ pokernetwork/pokertable.py (working copy)
@@ -811,16 +811,9 @@
if delta > autodeal_max: delta = autodeal_max
self.game_delay["delay"] = ( seconds() - self.game_delay["start"]
) + delta
elif self.transient:
- all_auto = True
- for player in game.playersAll():
- if not player.isAuto():
- all_auto = False
- delta = 0
- break
- if all_auto:
- delta = int(self.delays.get("autodeal_tournament_min", 15))
- if seconds() - self.game_delay["start"] > delta:
- delta = 0
+ delta = int(self.delays.get("autodeal_tournament_min", 15))
+ if seconds() - self.game_delay["start"] > delta:
+ delta = 0
else:
delta = 0
if self.factory.verbose > 2:
Index: tests/test-pokertable.py.in
===================================================================
--- tests/test-pokertable.py.in (revision 4932)
+++ tests/test-pokertable.py.in (working copy)
@@ -58,7 +58,7 @@
table2ID = 200
settings_xml = """<?xml version="1.0" encoding="ISO-8859-1"?>
<server verbose="4" autodeal="yes" max_missed_round="5">
- <delays autodeal="2" autodeal_max="2" autodeal_check="0" round="0"
position="0" showdown="0" finish="0" />
+ <delays autodeal_tournament_min="2" autodeal="2" autodeal_max="2"
autodeal_check="0" round="0" position="0" showdown="0" finish="0" />
<path>@POKER_ENGINE_PKGSYSCONFDIR@ @POKER_NETWORK_PKGSYSCONFDIR@</path>
<users temporary="BOT"/>
@@ -66,7 +66,7 @@
"""
settings_stripped_deck_no_autodeal_xml = """<?xml version="1.0"
encoding="ISO-8859-1"?>
<server verbose="4" autodeal="no" >
- <delays autodeal="2" autodeal_max="2" autodeal_check="0" round="0"
position="0" showdown="0" finish="0" />
+ <delays autodeal_tournament_min="2" autodeal="2" autodeal_max="2"
autodeal_check="0" round="0" position="0" showdown="0" finish="0" />
<decks>
<deck>9c 9d 9h Ts Tc Td Th Ts Jc Jd Jh Js Qc Qd Qh Qs Kc Kd Kh Ks Ac Ad Ah
As</deck>
@@ -1428,9 +1428,7 @@
def test01_autodeal(self):
""" Transient tables hand deal has a minimum duration if all players
are in auto mode """
self.createPlayer(1)
- self.table.game.autoPlayer(1)
self.createPlayer(2)
- self.table.game.autoPlayer(2)
self.table.game_delay["start"] = testclock._seconds_value
self.table.scheduleAutoDeal()
return self.clients[2].waitFor(PACKET_POKER_MESSAGE)
@@ -1447,9 +1445,7 @@
def test04_autodeal_transient_now(self):
""" Transient tables hand deal has no minium duration if all players
are in auto mode but the hand lasted more than the required minium """
self.createPlayer(1)
- self.table.game.autoPlayer(1)
self.createPlayer(2)
- self.table.game.autoPlayer(2)
self.table.game_delay["start"] = testclock._seconds_value - 300
self.table.scheduleAutoDeal()
self.clients[2].raiseIfPacket(PACKET_POKER_MESSAGE)
_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users