A simple PHP game using terminal.
Find out the number before end of lives.
- Range: 1 and 20.
- Lives: 5.
- Range: 1 and 30.
- Lives: 3.
- Range: 1 and 35.
- Lives: 2.
- Range: 1 and 50.
- Lives: 1.
docker-compose up --build -d
docker exec -it terminal-game-app composer install
(Optional:--no-dev
)docker exec -it terminal-game-app composer dump-autoload --optimize
- Or
docker start terminal-game-app
- Default mode:
php app/main.php
- Easy mode:
php app/main.php --mode easy
- Normal mode:
php app/main.php --mode normal
- Hard mode:
app/main.php --mode hard
- Hard Core mode:
php app/main.php --mode hard-core
- Debug mode:
php app/main.php --debug
- Default mode:
docker exec -it terminal-game-app <command_default>
- Easy/Normal/Hard/Hard Code/Debug mode:
docker exec -it terminal-game-app <command_*>
+-------------------------------------------------+
| Game - Find out the number. [mode:normal] |
| The number have range 1 - 30. |
| You have 3 chance for find out the number |
+-------------------------------------------------+
+-------------------------------------------------+
| Trick. |
+-------------------------------------------------+
| The number is < 29. |
| The number is > 20. |
+-------------------------------------------------+
+-------------------------------------------------+
| Game Over. |
+-------------------------------------------------+
| ='( Oh no! The number is 26. |
+-------------------------------------------------+
OR
+-------------------------------------------------+
| Game Over. |
+-------------------------------------------------+
| =) Congratulations! The number is 26. |
+-------------------------------------------------+
By Docker
docker exec -it terminal-game-app ./vendor/bin/phpcs --colors --report=full --ignore=*/vendor/* --warning-severity=8 --error-severity=1 --standard=PSR12 .
In container
./vendor/bin/phpcs --colors --report=full --ignore=*/vendor/* --warning-severity=8 --error-severity=1 --standard=PSR12 .
By docker
- All:
docker exec -it terminal-game-app ./vendor/bin/phpunit --verbose tests
- One:
docker exec -it terminal-game-app ./vendor/bin/phpunit --filter testDisplayHeader tests/VisionTextTest.php
In container
- All:
./vendor/bin/phpunit --verbose tests
- One:
./vendor/bin/phpunit --filter testDisplayHeader tests/VisionTextTest.php