コード例 #1
0
 public function getCards()
 {
     $cards = [];
     $suits = [Suit::club(), Suit::diamond(), Suit::heart(), Suit::spade()];
     foreach ($suits as $suit) {
         $this->addCards($cards, $suit);
     }
     return $cards;
 }
コード例 #2
0
ファイル: SuitTest.php プロジェクト: Aner-Git/cards
 public function testToString()
 {
     //
     $spade = Suit::spade();
     $this->assertEquals('spade', $spade);
     //
     $spade = Suit::diamond();
     $this->assertEquals('diamond', $spade);
 }