jamessessford/playing-cards 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jamessessford/playing-cards

最新稳定版本:v1.0.4

Composer 安装命令:

composer require jamessessford/playing-cards

包简介

A PHP implementation of a deck of playing cards to be used with Verbs

README 文档

README

A package to provide an implementation of a deck of cards for fun with Verbs

To use this package, run composer require jamessessford/playing-cards.

Once installed, you can run php artisan vendor:publish --provider=PlayingCards\\PlayingCardsProvider to publish the card images to your public directory.

Usage

use PlayingCards\Deck;
use PlayingCards\CardCollection;

$deck = new Deck();

$cardCollection = CardCollection::make($deck->deal());

$cardImage = card_front($cardCollection->pop());
$cardBackImage = card_back();

Deck contents

4 suits of 13 cards.

The suits in the deck are

Hearts
Clubs
Diamonds
Spades

The cards that make up each suit are

Ace
Two
Three
Four
Five
Six
Seven
Eight
Nine
Ten
Jack
Queen
King

A deck consists of 52 cards, covering each value for each suit

A deck can be shuffled

A deck can be dealt from

A deck can be queried for remaining cards

Cards

A card has a suit and a value

统计信息

  • 总下载量: 25
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-31