Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
a command-line-interacted texas holdem poker game, also include a real-time winning-rate calculator
This is a package including a command-line-interacted simulated texas holdem poker game, and a winning-rate calculator
In this game, you will play holdem and compete with AI which is based on Monte Carlo method and Kelly formula
If you are interested in poker game like this, try and enjoy!
(This is an alpha version now)
德州扑克模拟器
这个包包含了一个命令行交互形式的德州扑克游戏,以及包含一个实时胜率计算器
在该游戏中,你将与其他基于蒙特卡洛算法与凯利公式设计的AI玩家进行对抗
如果你也对德州扑克感兴趣,不妨一起来试一试吧!
(目前为alpha测试版本)
::
pip install texas_holdem_poker
class HoldemGame is a simulator of texas holdem poker game
to start the game, just import this class and call 'run' method
::
from texas_holdem_poker import HoldemGame
HoldemGame().run()
And it will work like this
::
Texas Holdem Poker Simulator
Your money: 1000
Player1 money: 1000
Player2 money: 1000
Player3 money: 1000
Player4 money: 1000
Player5 money: 1000
Round: 0
now your turn, your cards: [♦K, ♠K]
remaining money: 5000, already bet: 0
input your bet:
And then, input your bet(bet should be an integer) to action! fold if input < 0
check if input == 0 == bottom
call if input <= bottom
raise if input > bottom
class Calculator is designed for winning-rate calculation
::
from texas_holdem_poker import Calculator
Calculator(simulate_times=1500).run()
And it will work like this
::
Input your hand cards, for examples: "SJ S10", S=Spade♠, C=Club♣, H=Heart♥, D=Diamond♦
SJ S10
Input community cards, can be empty
Input total players and total remaining players(include yourself), for examples:"6 2"
6 2
Win Rate: 0.6093
through pip and pypi, you can easily use it anywhere and on any devices which can run python
(I sometimes use it on my mobile phone when play with my friends, lol P.S: they know that and agree)
FAQs
a command-line-interacted texas holdem poker game, also include a real-time winning-rate calculator
We found that texas-holdem-poker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.