Skip to main content

A package for poker functions

Project description

Poker Bot

Overview

Poker Bot is a Python package designed for calculating poker hand equities and managing a poker game. This package includes functionalities for deck management, hand evaluation, equity calculation, and game management.

Features

  • Deck Management: Initialize, shuffle, draw, and reset a deck of cards.
  • Hand Evaluation: Evaluate poker hands to determine their ranks.
  • Equity Calculation: Calculate the probability of winning, losing, and tying for two-player No-Limit Hold'em.
  • Game Management: Manage player buy-ins, rebuys, and cashouts in a poker game.

Installation

To install the package, use: ```sh pip install pokerFunctions ```

Usage

Deck Management

```python from pokerFunctions.equity import Deck

Initialize a new deck

deck = Deck()

Shuffle the deck

deck.shuffle()

Draw cards

cards = deck.draw(5) print(cards)

Reset the deck

deck.reset() ```

Hand Evaluation

```python from pokerFunctions.equity import evaluate

hand = ['6s', '7s', '8s', '9s', 'ts'] # Straight flush rank = evaluate(hand, Deck()) print(rank) # Output: [9, 10] ```

Equity Calculation

```python from pokerFunctions.equity import equity

hero = ['as', 'ks'] villain = ['qd', 'qh'] board = ['2s', '3s', '4s'] result = equity(hero, villain, board, runs=1000) print(result) # Output: [win_percentage_hero, win_percentage_villain, tie_percentage] ```

Game Management

```python from pokerFunctions.gamebank import Game

Initialize a new game

game = Game('host_name')

Add players

game.add_player('player1', 100) game.add_player('player2', 150)

Player rebuys

game.rebuy('player1', 50)

Remove a player (cash out)

game.remove_player('player2', 100)

Get game status

print(game.gamestatus()) ```

Development

To contribute to the development of Poker Bot, clone the repository and run the following commands to install the dependencies and run tests: ```sh git clone https://github.com/yourusername/pokerFunctions.git cd pokerFunctions pip install -r requirements.txt python -m unittest discover ```

License

This project is licensed under the MIT License.

Contact

For more information or support, contact Jonah Aden.


Note: This is a basic README template. Customize it according to your project's specifics and requirements.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pokerfunctions-0.3.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pokerFunctions-0.3-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file pokerfunctions-0.3.tar.gz.

File metadata

  • Download URL: pokerfunctions-0.3.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for pokerfunctions-0.3.tar.gz
Algorithm Hash digest
SHA256 44e56daddc1aa895214057669f208609e111b72eed4399a4c713c4104e368db9
MD5 c2548276a249285db1ad61e01647c7a2
BLAKE2b-256 26245187c856b40084962a0217bf97ae08eb4a43e755d765134d321bf2d5da35

See more details on using hashes here.

File details

Details for the file pokerFunctions-0.3-py3-none-any.whl.

File metadata

  • Download URL: pokerFunctions-0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for pokerFunctions-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c6b0b056201415a2974a3d050bf134f82bc930ad214e95c698b142f9ca90b062
MD5 a7acb9cfc45d1dd56d6cd8152a23496a
BLAKE2b-256 627546ca383f699eacfbf974b2f734363fbae9865067be47afebc8c7871d1fd9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page