iamvar / cardgame
This is the simple php console application to play card game 21.
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:bundle
Requires
- php: >=7.4
- symfony/console: ^5.1
This package is auto-updated.
Last update: 2025-05-31 00:18:40 UTC
README
Description
This is the simple php console application with symfony/console to play card game 21.
You have randomly shuffled deck of 52 cards (4 cards of each kind - 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A)
Each card has value associated with it:
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | J | Q | K | A |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 11 | 11 | 1 |
Goal
You have to pick cards to be as close to 21 as possible and have higher score than opponent.
Installation and Usage
To run application:
Installation
composer require iamvar/cardgame
Run
bin/console game:21