Download the PHP package chris-moreton/tournament-utils without Composer
On this page you can find all versions of the php package chris-moreton/tournament-utils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download chris-moreton/tournament-utils
More information about chris-moreton/tournament-utils
Files in chris-moreton/tournament-utils
Download chris-moreton/tournament-utils
More information about chris-moreton/tournament-utils
Files in chris-moreton/tournament-utils
Vendor chris-moreton
Package tournament-utils
Short Description Utilities for managing tournaments, particularly engine v engine tournaments
License MIT
Package tournament-utils
Short Description Utilities for managing tournaments, particularly engine v engine tournaments
License MIT
Please rate this library. Is it a good library?
Informations about the package tournament-utils
tournament-utils
Classes for determining pairings for tournaments.
Currently Round Robin is the only one I've written.
Getting started
From the root of your application
composer require chris-moreton/tournament-utils
Unless using a framework where autoloading is already taken care of, you'll need to
include 'vendor/autoload.php';
/*
* 5 players
* ------------------------------------------------
* | R1 | R2 | R3 | R4 | R5
* ------------------------------------------------
* Player 1 | 1 2 3 | 1 - 2 | 1 5 - | 1 4 5 | 1 3 4
* Player 2 | - 5 4 | 5 4 3 | 4 3 2 | 3 2 - | 2 - 5
*/
$t = new Netsensia\Tournament\RoundRobin\Schedule(5);
// [player1, player2, round_number]
[2,5,1] == $t->getNextPairing();
[3,4,1] == $t->getNextPairing();
[1,5,2] == $t->getNextPairing();
[2,3,2] == $t->getNextPairing();
[1,4,3] == $t->getNextPairing();
[5,3,3] == $t->getNextPairing();
[1,3,4] == $t->getNextPairing();
[4,2,4] == $t->getNextPairing();
[1,2,5] == $t->getNextPairing();
[4,5,5] == $t->getNextPairing();
null == $t->getNextPairing();
All versions of tournament-utils with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4.0
The package chris-moreton/tournament-utils contains the following files
Loading the files please wait ....