diff --git a/game/cards.php b/game/cards.php index d5b4c78..2b2d6db 100644 --- a/game/cards.php +++ b/game/cards.php @@ -7,3 +7,23 @@ foreach($suits as $suit) { echo $card.'_of_'.$suit.', '; } } +foreach($suits as $suit) { + foreach($cards as $card) { + $replace = [ + 'two' => 2, + 'three' => 3, + 'four' => 4, + 'five' => 5, + 'six' => 6, + 'seven' => 7, + 'eight' => 8, + 'nine' => 9, + 'ten' => 10, + ]; + $new_card = $replace[$card] ?? $card; + echo <<');\n + EOF; + } +} + diff --git a/scss/style.scss b/scss/style.scss index 94caf9b..847ae0b 100644 --- a/scss/style.scss +++ b/scss/style.scss @@ -234,3 +234,6 @@ body { .error { color: red; } +.card { + width: 3em; +} diff --git a/src/index.js b/src/index.js index 852b3d5..ce2e6c8 100644 --- a/src/index.js +++ b/src/index.js @@ -11,7 +11,58 @@ import entryPoint from '../game/game.ink'; * It's an easy way to define your own tags and text transformations. */ function transform (text: string) { - text = text.replace('two_of_spades', ''); + text = text.replace('two_of_spades', ''); + text = text.replace('three_of_spades', ''); + text = text.replace('four_of_spades', ''); + text = text.replace('five_of_spades', ''); + text = text.replace('six_of_spades', ''); + text = text.replace('seven_of_spades', ''); + text = text.replace('eight_of_spades', ''); + text = text.replace('nine_of_spades', ''); + text = text.replace('ten_of_spades', ''); + text = text.replace('jack_of_spades', ''); + text = text.replace('queen_of_spades', ''); + text = text.replace('king_of_spades', ''); + text = text.replace('ace_of_spades', ''); + text = text.replace('two_of_clubs', ''); + text = text.replace('three_of_clubs', ''); + text = text.replace('four_of_clubs', ''); + text = text.replace('five_of_clubs', ''); + text = text.replace('six_of_clubs', ''); + text = text.replace('seven_of_clubs', ''); + text = text.replace('eight_of_clubs', ''); + text = text.replace('nine_of_clubs', ''); + text = text.replace('ten_of_clubs', ''); + text = text.replace('jack_of_clubs', ''); + text = text.replace('queen_of_clubs', ''); + text = text.replace('king_of_clubs', ''); + text = text.replace('ace_of_clubs', ''); + text = text.replace('two_of_hearts', ''); + text = text.replace('three_of_hearts', ''); + text = text.replace('four_of_hearts', ''); + text = text.replace('five_of_hearts', ''); + text = text.replace('six_of_hearts', ''); + text = text.replace('seven_of_hearts', ''); + text = text.replace('eight_of_hearts', ''); + text = text.replace('nine_of_hearts', ''); + text = text.replace('ten_of_hearts', ''); + text = text.replace('jack_of_hearts', ''); + text = text.replace('queen_of_hearts', ''); + text = text.replace('king_of_hearts', ''); + text = text.replace('ace_of_hearts', ''); + text = text.replace('two_of_diamonds', ''); + text = text.replace('three_of_diamonds', ''); + text = text.replace('four_of_diamonds', ''); + text = text.replace('five_of_diamonds', ''); + text = text.replace('six_of_diamonds', ''); + text = text.replace('seven_of_diamonds', ''); + text = text.replace('eight_of_diamonds', ''); + text = text.replace('nine_of_diamonds', ''); + text = text.replace('ten_of_diamonds', ''); + text = text.replace('jack_of_diamonds', ''); + text = text.replace('queen_of_diamonds', ''); + text = text.replace('king_of_diamonds', ''); + text = text.replace('ace_of_diamonds', ''); text = text.replace('', ''); text = text.replace('', ''); text = text.replace('', '⏸️ ');