Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mohaphez/racing-game
Simple PHP console-based game!
https://github.com/mohaphez/racing-game
Last synced: about 1 month ago
JSON representation
Simple PHP console-based game!
- Host: GitHub
- URL: https://github.com/mohaphez/racing-game
- Owner: mohaphez
- Created: 2024-02-15T22:37:59.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-17T07:05:09.000Z (11 months ago)
- Last Synced: 2024-10-15T07:25:56.873Z (3 months ago)
- Language: PHP
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Racing Game
Welcome to the Racing Game project! This simple PHP console-based game allows two players to race against each other using different vehicles.
## Features
- Choose vehicles from a predefined list.
- Race simulation with progress bars for each player.
- Determine the winner based on the first player to complete the race.## Dependencies
This project uses the following packages:
- [PHP CLI Tools (php-cli-tools)](https://github.com/wp-cli/php-cli-tools): A collection of tools for PHP command-line applications.
## Deployment Considerations
During deployment, please ensure the following:
- PHP version 8.0 or higher is installed on the server.
- Composer is installed to manage project dependencies.## How to Run
### Manual Execution
1. Clone the repository:
```bash
git clone https://github.com/mohaphez/racing-game.git
```2. Navigate to the project directory:
```bash
cd racing-game
```3. Install dependencies using Composer:
```bash
composer install
```4. Run the game:
```bash
php src/index.php
```### Dockerized Execution
1. Ensure Docker is installed on your machine.
2. Clone the repository:
```bash
git clone https://github.com/mohaphez/racing-game.git
```3. Navigate to the project directory:
```bash
cd racing-game
```4. Build the Docker image:
```bash
docker build -t racing-game .
```5. Run the Docker container:
```bash
docker run -it racing-game
```## Gameplay
- Players will be prompted to choose a vehicle from the available options.
- The game will simulate the race, displaying progress bars for each player.
- The winner will be declared once a player completes the race.