garak / pokerino
A PHP library to manage Poker card games
v0.2.0
2025-07-10 09:30 UTC
Requires
- php: ^8.1
- doctrine/collections: ^2.0
- garak/card: ^0.7
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.80
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^10.5 || ^11.5 || ^12.2
This package is auto-updated.
Last update: 2025-07-10 09:31:57 UTC
README
Introduction
This library offers some PHP classes useful for creating a Poker card game:
- Game (needs to be extended)
- Player (needs to be extended)
- Hand
- PokerRank
Installation
Run composer require garak/pokerino
.
Usage
Here is an example of a game:
<?php require 'vendor/autoload.php'; use App\Game; // this is your Game class, extending \Garak\Pokerino\Game use App\Player; // this is your Player class, extending \Garak\Pokerino\Player $game = new Game(); $game->addPlayer(new Player('Marty McFly')); $game->addPlayer(new Player('Biff Tannen')); $game->addPlayer(new Player('Emmett Brown')); $game->addPlayer(new Player('Jennifer Parker')); $game->deal(); // deal 2 cards to each player $game->hands(); // return an array of \Garak\Pokerino\Hand
Credits
The original idea was developed with davidino.