enisshala/pokerhands

get poker hands from a file and return hands from the highest to lowest

v1.0 2019-11-30 17:35 UTC

This package is auto-updated.

Last update: 2025-05-29 01:24:59 UTC


README

Software License Build Status

This PHP package reads poker hands from a file and returns the list of the hands sorted by the rank from highest to lowest.

Install

Via Composer

$ composer require enisshala/pokerhands

Usage

$hands = new enisshala\PokerClass();
echo $hands->sortHands($hands_file);

Testing with CLI

in the root folder of the package there is IndexTest.php, you can run it in terminal with following command

php -r "include 'IndexTest.php'; IndexTest::test('https://pastebin.com/raw/FXneUYCc');"

I used Pastebin for hands and reading from file, some of the hands i used:

https://pastebin.com/raw/FXneUYCc
https://pastebin.com/raw/4xRPSB9j
https://pastebin.com/raw/5Mn3z8m1

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.