wip
This commit is contained in:
1 parent
2450ba626e
commit
1a4739eb4b
2 files changed
+18
-23
No files matched your search
@@ -70,11 +70,6 @@ class Expectations
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($finals as $key => $value) {
|
|
||||||
$finals[$key]['home'] = $value['home'] * $count_player / 10;
|
|
||||||
$finals[$key]['away'] = $value['away'] * $count_player / 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $finals;
|
return $finals;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -492,8 +492,6 @@ class PlayerPropsDrop extends Widget
|
|||||||
// (ATR) = Aspettativa Team * Numero di Giocatori di Team in Rosters (esclusi i portieri) / 10.
|
// (ATR) = Aspettativa Team * Numero di Giocatori di Team in Rosters (esclusi i portieri) / 10.
|
||||||
// Ad esempio per Remo (supponiamo 24 giocatori nel Roster esclusi i portieri): ATR = 1.2 * 24 / 10 = 2.88
|
// Ad esempio per Remo (supponiamo 24 giocatori nel Roster esclusi i portieri): ATR = 1.2 * 24 / 10 = 2.88
|
||||||
|
|
||||||
$asp_team_riferimento = (float) $asp_team * $count_player / 10;
|
|
||||||
|
|
||||||
$bettypes = ['goals', 'cards', 'fouls', 'offsides', 'total_shots', 'shots_on_target'];
|
$bettypes = ['goals', 'cards', 'fouls', 'offsides', 'total_shots', 'shots_on_target'];
|
||||||
foreach ($bettypes as $bettype) {
|
foreach ($bettypes as $bettype) {
|
||||||
$total_bettype = array_sum(array_column($results, 'asp_teorica_'.$bettype));
|
$total_bettype = array_sum(array_column($results, 'asp_teorica_'.$bettype));
|
||||||
@@ -502,41 +500,43 @@ class PlayerPropsDrop extends Widget
|
|||||||
switch ($bettype) {
|
switch ($bettype) {
|
||||||
case 'goals':
|
case 'goals':
|
||||||
// Aspettativa per Player: AP = AT * ATR / TOT AT
|
// Aspettativa per Player: AP = AT * ATR / TOT AT
|
||||||
$results[$key]['asp_total_'.$bettype] = $total_bettype;
|
|
||||||
// $results[$key]['asp_player_'.$bettype] = ((float) $value['asp_team'] * (float) $value['asp_teorica_'.$bettype]) / $total_bettype;
|
// $results[$key]['asp_player_'.$bettype] = ((float) $value['asp_team'] * (float) $value['asp_teorica_'.$bettype]) / $total_bettype;
|
||||||
// $results[$key]['asp_player_'.$bettype] = ($asp_team * $asp_team_riferimento) / $total_bettype;
|
// $results[$key]['asp_player_'.$bettype] = ($asp_team * $asp_team_riferimento) / $total_bettype;
|
||||||
|
|
||||||
|
$asp_team_riferimento = (float) $asp_team * $count_player / 10;
|
||||||
|
$results[$key]['asp_total_'.$bettype] = $total_bettype;
|
||||||
$results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype;
|
$results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype;
|
||||||
$results[$key]['asp_riferimento_goals'] = $asp_team_riferimento;
|
$results[$key]['asp_riferimento_goals'] = $asp_team_riferimento;
|
||||||
break;
|
break;
|
||||||
case 'cards':
|
case 'cards':
|
||||||
$asp_referimento = $asp_team_all['crd'][$team_home_away];
|
$asp_team_riferimento = (float) $asp_team_all['crd'][$team_home_away] * $count_player / 10;
|
||||||
|
$results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype;
|
||||||
$results[$key]['asp_total_'.$bettype] = $total_bettype;
|
$results[$key]['asp_total_'.$bettype] = $total_bettype;
|
||||||
$results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_referimento / $total_bettype;
|
$results[$key]['asp_team_riferimento_card'] = $asp_team_riferimento;
|
||||||
$results[$key]['asp_team_riferimento_card'] = $asp_referimento;
|
|
||||||
break;
|
break;
|
||||||
case 'fouls':
|
case 'fouls':
|
||||||
$asp_referimento = $asp_team_all['fls'][$team_home_away];
|
$asp_team_riferimento = (float) $asp_team_all['fls'][$team_home_away] * $count_player / 10;
|
||||||
$results[$key]['asp_total_'.$bettype] = $total_bettype;
|
$results[$key]['asp_total_'.$bettype] = $total_bettype;
|
||||||
$results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_referimento / $total_bettype;
|
$results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype;
|
||||||
$results[$key]['asp_team_riferimento_fouls'] = $asp_referimento;
|
$results[$key]['asp_team_riferimento_fouls'] = $asp_team_riferimento;
|
||||||
break;
|
break;
|
||||||
case 'offsides':
|
case 'offsides':
|
||||||
$asp_referimento = $asp_team_all['ofs'][$team_home_away];
|
$asp_team_riferimento = (float) $asp_team_all['ofs'][$team_home_away] * $count_player / 10;
|
||||||
$results[$key]['asp_total_'.$bettype] = $total_bettype;
|
$results[$key]['asp_total_'.$bettype] = $total_bettype;
|
||||||
$results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_referimento / $total_bettype;
|
$results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype;
|
||||||
$results[$key]['asp_team_riferimento_offside'] = $asp_referimento;
|
$results[$key]['asp_team_riferimento_offside'] = $asp_team_riferimento;
|
||||||
break;
|
break;
|
||||||
case 'total_shots':
|
case 'total_shots':
|
||||||
$asp_referimento = $asp_team_all['tsh'][$team_home_away];
|
$asp_team_riferimento = (float) $asp_team_all['tsh'][$team_home_away] * $count_player / 10;
|
||||||
$results[$key]['asp_total_'.$bettype] = $total_bettype;
|
$results[$key]['asp_total_'.$bettype] = $total_bettype;
|
||||||
$results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_referimento / $total_bettype;
|
$results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype;
|
||||||
$results[$key]['asp_team_riferimento_tsh'] = $asp_referimento;
|
$results[$key]['asp_team_riferimento_tsh'] = $asp_team_riferimento;
|
||||||
break;
|
break;
|
||||||
case 'shots_on_target':
|
case 'shots_on_target':
|
||||||
$asp_referimento = $asp_team_all['snt'][$team_home_away];
|
$asp_team_riferimento = (float) $asp_team_all['snt'][$team_home_away] * $count_player / 10;
|
||||||
$results[$key]['asp_total_'.$bettype] = $total_bettype;
|
$results[$key]['asp_total_'.$bettype] = $total_bettype;
|
||||||
$results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_referimento / $total_bettype;
|
$results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype;
|
||||||
$results[$key]['asp_team_riferimento_snt'] = $asp_referimento;
|
$results[$key]['asp_team_riferimento_snt'] = $asp_team_riferimento;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user