This is a library that will help you create a poker game.
Project description
PokerH
About
What is this?
This is a module that will help you create a poker game.
Library Features
Creating deck, hand, board as a list
Print the above and any lists
Print what combos are on the table
Print outs
Features of printing outs
Outs are calculated exclusively using a table taken from Roy Rounder's book
Outs can only be counted after using check_hand.combos()
Getting Started
Installation
pip install poker-h
Usage
Using this module is very simple and intuitive.
First we have to import everything from the module
from poker_h import *
Examples of all functions:
Creating a deck or hand
d = deck.deck()
h = deck.hand(d)
To create a board, we must specify a number, this is the number of cards that the program will distribute to the table
number = 5 #any number
b = deck.board(d, number)
To print deck, hand, board, or any other cards in the list
print(deck.print_cards(d))
To print the combos and how many outs you have (be sure to write hand and board)
print(check_hand.combos(h, b))
print(check_hand.outs())
Example
from main import *
d = deck.deck()
b = deck.board(d, 5)
h = deck.hand(d)
print(f"Cards in hand: {deck.print_cards(h)}")
print(f"Cards on the table: {deck.print_cards(b)}")
print(f"\nCombination with cards: {check_hand.combos(h, b)}")
print(f"How many outs: {check_hand.outs()}")
Developer
Gimer
GitHub: link
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
Built Distribution
File details
Details for the file poker_h-1.0.2.tar.gz
.
File metadata
- Download URL: poker_h-1.0.2.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | faaa27bd19d36ed6a0f4ccc0ed6a8959193fb8901cef0993e3286eb68ed41079 |
|
MD5 | d52e2a8dcce88c135d33a29a73884c11 |
|
BLAKE2b-256 | aa978cf296fcbbc4181b3cc70676fc39ba83194f6e4f2659c2f5118b0383fcdb |
File details
Details for the file poker_h-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: poker_h-1.0.2-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2178891c8aecd8bdae57d9acf8ddcb1b817667fd2338412d48fdfb346bb4df3a |
|
MD5 | c9b563a1d57c0ed8f63de52bdeac9a66 |
|
BLAKE2b-256 | 4a7c0cff86f9e35eba6f08e858369e7e285d99ff7f9f44d342f10a186e7de6fe |