From fa386850b8c5e9ea26d0530ecd8cdbe9dbb3b7d7 Mon Sep 17 00:00:00 2001 From: hecht Date: Mon, 21 Nov 2011 19:47:27 +0000 Subject: [PATCH] added the elo calculation method --- ag/include/elo.inc.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 ag/include/elo.inc.php diff --git a/ag/include/elo.inc.php b/ag/include/elo.inc.php new file mode 100644 index 0000000..127377b --- /dev/null +++ b/ag/include/elo.inc.php @@ -0,0 +1,41 @@ +'; +echo calculateElo(1000, 1000, -5,5) . '
'; +echo calculateElo(900,1100,5,5) . '
'; +echo calculateElo(900,1100,-5,5) . '
'; +echo calculateElo(1100,900,5,5) . '
'; +echo calculateElo(1100,900,-5,5) . '
'; +echo calculateElo(2000,500,5,5) . '
'; +echo calculateElo(2000,500,-5,5) . '
'; + +for($i=1000;$i<2000;$i++) { + if($i == calculateElo($i, 1000, 5, 5)) { + echo 'ranking that does not provide points against 1000 is ' .$i . '
'; + break; + } +} +*/ + +?>