nubox/standard-card-deck

There is no license information available for the latest version (dev-master) of this package.

simple functions for displaying standard card decks

Fund package maintenance!
Community Bridge

Installs: 29

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/nubox/standard-card-deck

dev-master 2023-08-21 20:23 UTC

This package is auto-updated.

Last update: 2025-09-22 01:07:58 UTC


README

Introduction

This small composer package helps to render playing cards via HTML.

img.png

Installation

Install through composer

{
    "require" : {
        "nubox/standard-card-deck" : "*"
    }
}

Usage

Draw a card by a simple string

include 'vendor/autoload.php';

echo drawCard('4 Karo');
echo drawCard('10 Herz');

Generating a card deck, take a card from the deck and draw it (OOP Style)

$deck = new \NuBox\StandardCardDeck\Model\Deck();

// or

$deck = \NuBox\StandardCardDeck\Singleton\DeckSingleton::getInstance()->getDeck();

echo drawCard($deck->takeCard());