Skip to content

cliffordvickrey/dogs-playing-poker

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

cliffordvickrey/dogs-playing-poker

Build Status Coverage Status

Ever look at Cassius Marcellus Coolidge's seminal chef d'oeuvre Dogs Playing Poker and think, "this is okay, but wouldn't it be nice if I could see the painting with any of 6.6 quadrillion possible card combinations?" No? Too bad! This library generates any one of 6,622,345,729,233,223,680 possible hand variations of dogs playing poker.

Online at https://www.cliffordvickrey.com/dogs-playing-poker/example

Installation

Run the following to install this library:

$ composer require cliffordvickrey/dogs-playing-poker

Requirements

  • 64-bit build of PHP 7.2 or above
  • Imagick extension installed and enabled

Usage

// build the generator
$generator = Cliffordvickrey\DogsPlayingPoker\DogsPlayingPokerGenerator::build();

// generate a painting at random ...
$painting = $generator->generate();

// ... or a specific ID for the same painting every time
$painting = $generator->generate(1);

// get the painting as a blob ...
$blob = $dogsPlayingPoker->getDogsAsBlob();

// ... or as a stream
$stream = fopen('php://temp', 'w');
$painting->writeDogsToResource($stream);

About

A PHP package for generating any of 6.6 quadrillion possible paintings of dogs playing Poker

Resources

Stars

Watchers

Forks

Packages

No packages published