Download the PHP
package bissolli/php-match-card-game without Composer
On this page you can find all versions of the php package
bissolli/php-match-card-game. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor bissolli Package php-match-card-game Short Description Simple card game built in PHP that let players have fun playing against each other. Wins who gets its own hand empty first! License
MIT
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Informations about the package php-match-card-game
PHP Card Game
Simple card game built in PHP that let players have fun playing against each other. Wins who gets its own hand empty first!
Installation
To get started, require this composer package:
Or simply clone the project, run composer install and check the index.php file
Game rules
The deck consists out of 52 cards.
Every player starts with same amount of cards (default: 7).
Game starts with the top card of the deck which is gonna create the leftover deck.
Each turn another player places a card on the top of the leftover deck.
This card must be of the same value or from the same color.
If player cannot place a card, he should get a new card on the deck and skip his turn.
The first player that doesn’t have any cards left, wins the game.
Usage
The first step to start the game is instantiating the Game class which is going to be our "Game Manager" and get the deck ready and shuffled.
Once we have the game ready, we need to add the players - you can add as much players as you wish as long as the deck supports it.
Remember, each player starts with 7 cards and the deck has a total of 52 cards.
As long as we have the deck ready and the players enrolled, let's server 7 cards for each player.
To start the game and shift the top card from the deck to the leftover deck:
From now on we all all the following methods available
``
See below methods available for the Card model
See below methods available for the Player model
See below methods available for the DeckManager
Output
You can see a code example in the ./index.php which should output something like this:
Author
Gustavo Bissolli
License
Laravel Cashier is open-sourced software licensed under the MIT license.
All versions of php-match-card-game with dependencies
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package bissolli/php-match-card-game contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.