PHP code example of alcalyn / elo

1. Go to this page and download the library: Download alcalyn/elo library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

alcalyn / elo example snippets

 php
use Alcalyn/Elo/EloSystem;

$eloSystem = new EloSystem();
 php
/**
 * Method Aliases
 */
$elo->win(2100, 1500, 1.0, 0.0);
$elo->lose(2100, 1500, 1.0, 0.0);
$elo->draw(2100, 1500, 1.0, 0.0);
 php
/**
 * Use a different K factor in your Elo system
 */
$eloSystemK32 = new EloSystem(32);