当前位置: 首页>>代码示例>>PHP>>正文


PHP Card::fromString方法代码示例

本文整理汇总了PHP中Card::fromString方法的典型用法代码示例。如果您正苦于以下问题:PHP Card::fromString方法的具体用法?PHP Card::fromString怎么用?PHP Card::fromString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Card的用法示例。


在下文中一共展示了Card::fromString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addCard

 public function addCard($mCard)
 {
     $oCard = is_string($mCard) ? Card::fromString($mCard) : $mCard;
     $this->aCards[] = $oCard;
 }
开发者ID:rubensayshi,项目名称:psycic-poker-php,代码行数:5,代码来源:CardBag.php

示例2: standard

 /**
  * @param DeckId $deckId
  * @return Deck
  */
 public static function standard(DeckId $deckId)
 {
     return new Deck($deckId, [Card::fromString('As'), Card::fromString('2s'), Card::fromString('3s'), Card::fromString('4s'), Card::fromString('5s'), Card::fromString('6s'), Card::fromString('7s'), Card::fromString('8s'), Card::fromString('9s'), Card::fromString('Ts'), Card::fromString('Js'), Card::fromString('Qs'), Card::fromString('Ks'), Card::fromString('Ad'), Card::fromString('2d'), Card::fromString('3d'), Card::fromString('4d'), Card::fromString('5d'), Card::fromString('6d'), Card::fromString('7d'), Card::fromString('8d'), Card::fromString('9d'), Card::fromString('Td'), Card::fromString('Jd'), Card::fromString('Qd'), Card::fromString('Kd'), Card::fromString('Ac'), Card::fromString('2c'), Card::fromString('3c'), Card::fromString('4c'), Card::fromString('5c'), Card::fromString('6c'), Card::fromString('7c'), Card::fromString('8c'), Card::fromString('9c'), Card::fromString('Tc'), Card::fromString('Jc'), Card::fromString('Qc'), Card::fromString('Kc'), Card::fromString('Ah'), Card::fromString('2h'), Card::fromString('3h'), Card::fromString('4h'), Card::fromString('5h'), Card::fromString('6h'), Card::fromString('7h'), Card::fromString('8h'), Card::fromString('9h'), Card::fromString('Th'), Card::fromString('Jh'), Card::fromString('Qh'), Card::fromString('Kh')]);
 }
开发者ID:acairns,项目名称:sitepoint-command-bus,代码行数:8,代码来源:Deck.php


注:本文中的Card::fromString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。