Project Brief:
The game begins with the players choosing a vehicle from a list provided in a vehicles.json
file. Each vehicle has a maximum speed. The application will calculate the time taken by each vehicle to complete a given distance based on its speed, and then declare the winner.
Core Features:
- Load the list of available vehicles from a
vehicles.json
file. - Allow two players to select a vehicle each from this list.
- Run a race using the selected vehicles.
- Calculate the time taken by each vehicle to complete the race based on vehicle's speed.
- Determine and display the winner.
- Display the time taken by each vehicle to finish the race.
How to run Project:
Provide php and composer environment and run following commands:
composer install
php src/index.php