https://github.com/sjdiego/slot-command-lumen
A small command made in Lumen to play a slot machine
https://github.com/sjdiego/slot-command-lumen
docker lumen php slot
Last synced: 3 months ago
JSON representation
A small command made in Lumen to play a slot machine
- Host: GitHub
- URL: https://github.com/sjdiego/slot-command-lumen
- Owner: sjdiego
- Created: 2021-03-10T14:45:28.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-30T16:20:05.000Z (almost 4 years ago)
- Last Synced: 2025-01-14T15:20:58.579Z (9 months ago)
- Topics: docker, lumen, php, slot
- Language: PHP
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Slot Command
A simple command on Lumen which plays a typical Slot game
### Requirements
- PHP 8.0 (included in Docker)
### Docker
It has a docker-compose.yml file to spin up nginx and php containers and initialize the application.
Just copy or rename the docker-compose.example.yml as your needs and execute the following commands:- `docker-compose up`
- `docker-compose exec php composer install`
- `docker-compose exec php php artisan slot`### Expected output
As example:
```
{
"board": [
"Q",
"Q",
"bird",
"monkey",
"dog",
"bird",
"Q",
"bird",
"J",
"Q",
"cat",
"cat",
"J",
"10",
"bird"
],
"paylines": [
{
"0 3 6 9 12": 3
},
{
"2 5 8 11 14": 3
}
],
"bet_amount": 100,
"total_win": 40
}
```### Testing
If you run docker you can use the following command to perform a test over SlotCommand class
- `docker-compose exec php php vendor/bin/phpunit --testdox`