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.2.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.2-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pokerfunctions-0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 370b74e37ab729b73e765d437393ef62471eee50d6b39c58bcb591dcba07d1fd
MD5 7057748b2830adb53132f39c9eea969f
BLAKE2b-256 2c92fd25f49d91f5ddff252c5c50c10d03a1a0d4705d888a56b28674ddc3142f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pokerFunctions-0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2fb116ff463d3bb61aa7c801bd942cb3abaa59f139d3fad8aa89e5f78febb35d
MD5 da9b4d8c4e07922d941ab0f2d65d59c0
BLAKE2b-256 3875d5742bb1e679d5d27fb9c87d57bd9c6e871214a916ab4782e03a6a45df49

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