renewd grapper wip

This commit is contained in:
salam committed 2026-01-19 18:36:07 +01:00
1 parent 8f1aeafe46
commit 4afe60a957
55 files changed
+1389 -823

No files matched your search

@@ -0,0 +1,35 @@
<?php
namespace App\Console\Commands\Grapper\Logifuture\Tools;
class ActiveHandicap
{
public static function set(&$_spreads)
{
$tmp = 10000;
$hcap = false;
foreach ($_spreads as $key => $value) {
$x = 0;
foreach ($value as $k => $v) {
if ($x == 0) {
$x = $v;
} else {
$x -= $v;
}
}
$x = abs($x);
if ($x < $tmp) {
$hcap = $key;
$tmp = $x;
}
}
foreach ($_spreads as $key => $value) {
if ($key == $hcap) {
$_spreads[$key]['active_spread'] = 1;
} else {
$_spreads[$key]['active_spread'] = 0;
}
}
}
}