# Authors: # Loic Dachary <*****@*****.**> # Bradley M. Kuhn <*****@*****.**> # from math import ceil from types import StringType from pprint import pformat import time, sys, random def tournament_seconds(): return time.time() shuffler = random from pokerengine import log as engine_log log = engine_log.getChild('pokertournament') from pokerengine.pokergame import PokerGameServer from pokerengine import pokerprizes TOURNAMENT_STATE_ANNOUNCED = "announced" TOURNAMENT_STATE_REGISTERING = "registering" TOURNAMENT_STATE_RUNNING = "running" TOURNAMENT_STATE_BREAK_WAIT = "breakwait" TOURNAMENT_STATE_BREAK = "break" TOURNAMENT_STATE_COMPLETE = "complete" TOURNAMENT_STATE_CANCELED = "canceled" def equalizeCandidates(games): # # Games less than 70% full are willing to steal players from other
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # # Authors: # Loic Dachary <*****@*****.**> # import os from os.path import exists, expanduser, abspath, isfile from pokerengine.version import Version, version from pokerengine import log as engine_log log = engine_log.getChild('config') import re import libxml2 import libxslt class Config: upgrades_repository = None upgrade_dry_run = False verbose = 0 def __init__(self, dirs): self.path = None self.header = None self.doc = None
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # # Authors: # Loic Dachary <*****@*****.**> # # from types import StringType import re from pokerengine import version_number from pokerengine import log as engine_log log = engine_log.getChild('version') class Version: verbose = 0 version_re = re.compile(r'^(\d+)\.(\d+)\.(\d+)$', re.VERBOSE) upgrade_re = re.compile(r'.*?(\d+\.\d+\.\d+)-(\d+\.\d+\.\d+)', re.VERBOSE) def __init__ (self, vstring=None): self.log = log.getChild(self.__class__.__name__) if vstring:
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # # Authors: # Loic Dachary <*****@*****.**> # Bradley M. Kuhn <*****@*****.**> # from pokerengine import log as engine_log log = engine_log.getChild('pokerprizes') from pokerengine.pokerengineconfig import Config class PokerPrizes: """PokerPrizesVirtual base class for PokerPrizes""" def __init__(self, buy_in_amount, player_count = 0, guarantee_amount = 0, config_dirs = None): self.log = log.getChild(self.__class__.__name__) self.buy_in = buy_in_amount self.player_count = player_count self.guarantee_amount = guarantee_amount def error(self, string): raise DeprecationWarning("message is deprecated") self.message("ERROR " + string) def message(self, string):