Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Nicholas Rathmann  >  Round robin tournament scheduler  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: Round robin tournament scheduler
Schedule a round robin games tournament
Author: By
Last change:
Date: 2008-07-19 14:25
Size: 462 bytes
 

Contents

Class file image Download
<?php

error_reporting
(E_ALL);

require(
"class_rrobin.php");

// Lets create a round robin style tournament between some of our dear physicists.
$competitors = array(
    
'Paul A.M. Dirac'
    
'Hans Christian Oersted'
    
'Murray Gell-Mann'
    
'Marie Curie'
    
'Neils Bohr'
    
'Richard P. Feynman'
    
'Max Planck');

$robin = new RRobin();
$robin->create($competitors);

echo 
$robin->tot_games " games scheduled:\n";
print_r($robin->tour);

?>