From 434544678b03643039c9b543ed16dd9e1dc4fa00 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Sat, 24 Sep 2022 00:22:12 +0200 Subject: [PATCH] test --- methods/schulzeResults.php | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/methods/schulzeResults.php b/methods/schulzeResults.php index 69e7f1a..93d9571 100644 --- a/methods/schulzeResults.php +++ b/methods/schulzeResults.php @@ -14,20 +14,6 @@ class schulze array(5, 3, 2, 4, 1), ); - function matrix() - { - foreach($nvotes as $votes) - { - for ($i=1;$i<=$votes;$i++) - { - for ($j=1;$j<=$ncandidats;$j++) - { - void; - } - } - } - } - function stringify($votes) { $r = array(); @@ -47,7 +33,14 @@ class schulze } } - function test($v) + function callBack($votes) + { + $mvotes = $this->matrix($votes); + $rvotes = $this->result($mvotes); + print_r($p); + } + + function matrix($v) { $w = array(); $i = 0; @@ -79,9 +72,10 @@ class schulze } $w = $this->votify($w); print_r($w); + return $w; } - function result() + function result($v) { for ($i=1;$i<=$ncandidats;$i++) { @@ -108,8 +102,8 @@ class schulze } } } - return $p; } + return $p; } } ?>