-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFace.php
More file actions
34 lines (29 loc) · 664 Bytes
/
Copy pathFace.php
File metadata and controls
34 lines (29 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
declare(strict_types=1);
namespace Likewinter\CardDeck;
/**
* Face-up / face-down state for a card in play.
*
* Most games keep cards face-up once played. Games with partial
* information (Solitaire tableau, War's face-down cards, hand cards
* hidden from opponents) use Face::Down until a card is revealed.
*/
enum Face: string
{
case Up = 'up';
case Down = 'down';
/**
* Whether the card is face-up.
*/
public function isUp(): bool
{
return $this === self::Up;
}
/**
* Whether the card is face-down.
*/
public function isDown(): bool
{
return $this === self::Down;
}
}