2017 © Pedro Peláez
 

library tournament-utils

Utilities for managing tournaments, particularly engine v engine tournaments

image

chris-moreton/tournament-utils

Utilities for managing tournaments, particularly engine v engine tournaments

  • Friday, October 7, 2016
  • by Chrismo2012
  • Repository
  • 1 Watchers
  • 0 Stars
  • 17 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

tournament-utils

Classes for determining pairings for tournaments., (*1)

Currently Round Robin is the only one I've written., (*2)

Getting started

From the root of your application, (*3)

composer require chris-moreton/tournament-utils

Unless using a framework where autoloading is already taken care of, you'll need to, (*4)

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();

The Versions

07/10 2016

dev-master

9999999-dev

Utilities for managing tournaments, particularly engine v engine tournaments

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

07/10 2016

v1.0.1

1.0.1.0

Utilities for managing tournaments, particularly engine v engine tournaments

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

07/10 2016

v1.0.0

1.0.0.0

Utilities for managing tournaments, particularly engine v engine tournaments

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires