Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roliod/texas-holdem-up-validation-rules
A Texas Hold’em poker hands validation rule engine in PHP
https://github.com/roliod/texas-holdem-up-validation-rules
poker texas-holdem texas-holdem-poker
Last synced: 2 days ago
JSON representation
A Texas Hold’em poker hands validation rule engine in PHP
- Host: GitHub
- URL: https://github.com/roliod/texas-holdem-up-validation-rules
- Owner: roliod
- Created: 2020-11-26T23:55:39.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-22T19:35:32.000Z (almost 4 years ago)
- Last Synced: 2024-04-29T03:22:04.367Z (7 months ago)
- Topics: poker, texas-holdem, texas-holdem-poker
- Language: PHP
- Homepage: https://packagist.org/packages/roliod/texas-holdem-up-validation-rules
- Size: 56.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Texas Hold'em Up Validator Rule Engine
[![Build Status](https://travis-ci.com/roliod/texas-holdem-up-validation-rules.svg?token=xLWRR38GPhFQuvaZTh9c&branch=master)](https://travis-ci.com/roliod/texas-holdem-up-validation-rules)
A Texas Hold’em poker hands validation rule engine in PHP.
# Installation
### Prerequisites
PHP version >= 7.2### Install Package
In order to install this package can either add it directly to your `composer.json`:
```json
{
"require": {
"roliod/texas-holdem-up-validation-rules": "^1.1.1"
}
}
```OR
`composer require roliod/texas-holdem-up-validation-rules`
# Quick Start
This package followings the [Standard Poker Hand Ranking rules](https://www.fgbradleys.com/et_poker.asp).
In order to get the rank of a list of hands using this package, you will need to do the following.
```php
rank();print_r($rankingList);
```### Sample TXT File Content
Here is a sample txt file content acceptable by the package:
```text
10❤ 10♦ 10♠ 9♣ 9♦
4♠ J♠ 8♠ 2♠ 9♠
3♦ J♣ 8♠ 4❤ 2♠
7♣ 7♦ 7♠ K♣ 3♦
A❤ A♦ 8♣ 4♠ 7❤
J❤ J♦ J♠ J♣ 7♦
8♣ 7♣ 6♣ 5♣ 4♣
9♣ 8♦ 7♠ 6♦ 5❤
4♣ 4♠ 3♣ 3♦ Q♣
A♦ K♦ Q♦ J♦ 10♦
```