Package Data | |
---|---|
Maintainer Username: | marcelotk |
Maintainer Contact: | marcelotk_15@hotmail.com (Marcelo Augusto) |
Package Create Date: | 2017-02-16 |
Package Last Update: | 2019-06-30 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-21 03:02:17 |
Package Statistics | |
---|---|
Total Downloads: | 5,469 |
Monthly Downloads: | 21 |
Daily Downloads: | 1 |
Total Stars: | 4 |
Total Watchers: | 1 |
Total Forks: | 6 |
Total Open Issues: | 1 |
Round-Robin is an easy way to create schedule with round-robin(rr) technique. I used the mnito's base code for this. Look here: https://github.com/mnito/round-robin
composer update
:"marcelotk15/round-robin": "0.1.*"
or run composer require marcelotk15/round-robin
config/app.php
and add the following to the providers
array:Laravel\RoundRobin\RoundRobinServiceProvider::class,
use Laravel\RoundRobin\RoundRobin;
Setuping:
$teams = ['Arsenal', 'Atlético de Madrid', 'Borussia', 'Barcelona','Liverpool', 'Bayer 04', 'Real Madrid'];
$roundRobin = new RoundRobin($teams);
$roundRobin = $roundRobin->build();
Generate a schedule without randomly shuffling the teams using the $shuffle boolean parameter:
$teams = ['Arsenal', 'Atlético de Madrid', 'Borussia', 'Barcelona','Liverpool', 'Bayer 04', 'Real Madrid'];
$roundRobin = new RoundRobin($teams);
$rounRobin->doNotShuffle();
$roundRobin = $roundRobin->build();
Use your own seed with the $seed integer parameter for predetermined shuffling:
$teams = ['Arsenal', 'Atlético de Madrid', 'Borussia', 'Barcelona','Liverpool', 'Bayer 04', 'Real Madrid'];
$roundRobin = new RoundRobin($teams);
$rounRobin->shuffle(15);
$roundRobin = $roundRobin->build();
If you want a double Round-robin:
$teams = ['Arsenal', 'Atlético de Madrid', 'Borussia', 'Barcelona','Liverpool', 'Bayer 04', 'Real Madrid'];
$roundRobin = new RoundRobin($teams);
$rounRobin->doubleRoundRobin();
$roundRobin = $roundRobin->build();
Laravel Round-Robin is free software distributed under the terms of the MIT license.