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.6.tar.gz (8.1 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.6-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pokerfunctions-0.6.tar.gz
Algorithm Hash digest
SHA256 d3b1dbf3be637fdfb35ca2de2900543bb00c50b05ca70f846f497ae4edc8320e
MD5 4e7a04ac9366678b8b023a3d2ff9aecd
BLAKE2b-256 8cc9926e0f58b7485c63fb7f702a9eb2a122aaa5e0b82fc92cc36490234d3ec4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pokerFunctions-0.6-py3-none-any.whl
  • Upload date:
  • Size: 8.0 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5226480edd70a4da7f67d5bfa6a688538d1316ab1784915be6ea88aebbe41776
MD5 d96283fef8669fd70ccb8038fb18ee5d
BLAKE2b-256 ac746d7f0db365c2fe81882b46cec03912aab0950dd7b1474ca536f0108f675c

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