Skip to content

CharltonSantana/Bowls-Round-Robin-Rink-Capper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bowls Round-Robin League Generation - Rink Capper

The problem with the standard round robin algorithm is you are limited to how many teams you have depending on how many rinks you have. This code helps you cap the amount of rinks by extending how many matches are played.

Standard Usage:

$rinkCap = 3;
$teams = ['Team 1', 'Team 2', 'Team 3', 'Team 4', 'Team 5', 'Team 6', 'Team 7', 'Team 8'];

// Init new Round Robin
$roundRobin = new RoundRobin($teams);

// Get unrendered schedule
$schedule = $roundRobin->getSchedule();
$schedule = $roundRobin->capSchedule($schedule, $rinkCap);

echo $roundRobin->renderSchedule($schedule);

About

Bowls League Generation Capper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages