https://github.com/lessmore92/php-race-game
CLI-Based Two-Player Vehicle Racing Game in PHP
https://github.com/lessmore92/php-race-game
Last synced: about 1 year ago
JSON representation
CLI-Based Two-Player Vehicle Racing Game in PHP
- Host: GitHub
- URL: https://github.com/lessmore92/php-race-game
- Owner: lessmore92
- Created: 2024-03-09T12:17:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-09T22:18:28.000Z (over 2 years ago)
- Last Synced: 2025-01-22T21:42:43.676Z (over 1 year ago)
- Language: PHP
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CLI-Based Two-Player Vehicle Racing Game in PHP
## Installation
```shell
composer install
```
## How To Start
Start the game:
```shell
php index.php
```
### Sample out-put
```shell
Welcome to the PHP Racing Game!
Please select a vehicle for each player from the list below:
1. Car - 150 km/h
2. Motorcycle - 200 km/h
3. Bus - 100 km/h
4. Bicycle - 30 km/h
5. Jet Ski - 50 km/h
6. Speed Boat - 70 km/h
7. Yacht - 20 km/h
8. Helicopter - 140 km/h
9. Airplane - 485 km/h
10. Hot Air Balloon - 5 km/h
What is the distance of the race track? [200]: 400
Player 1, enter the number of your vehicle: 4
Player 2, enter the number of your vehicle: 5
The race distance is 400 km
The race results are:
Place 1: Player 2 (Jet Ski) - 8 hours
Place 2: Player 1 (Bicycle) - 13.33 hours
The winner is Player 2 (Jet Ski)!
```