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.1.tar.gz (2.3 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.1-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pokerfunctions-0.1.tar.gz
Algorithm Hash digest
SHA256 e5ae94cc9bc20b5bced70014844677a3cccaa57636a740a13a933aa31da02157
MD5 66557d2771aff6830e04d3e7288a752d
BLAKE2b-256 731c40507f873977459a352b490798bba2cb2c8e7661440ea79aa044ff0f7276

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pokerFunctions-0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca61207df61ca53776c93b66a08d006e8a58c0e952a8c5ec87e9ababe5aa3597
MD5 78341d69d5c868e300a2d6259d935ec5
BLAKE2b-256 d5b2f348e3cc85b6c75ea9d3dfca57d65f0cb83d4745b5d2aa5d6124d748145e

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