wip
This commit is contained in:
1 parent
abf9a913e0
commit
d793f0b844
1 file changed
+31
-11
@@ -554,18 +554,9 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
|
||||
// Se la SMG è < Y per quel Player prenderemo in considerazione solo l'Aspettativa Statistica (AS).
|
||||
// Il valore Y dovrebbe essere configurabile in una interfaccia. Il valore iniziale lo fissiamo a Y = 180
|
||||
|
||||
// Somma Goals fatti da Player nel DB
|
||||
$somma_goals = $val->goals;
|
||||
$tmp['somma_goals'] = $somma_goals;
|
||||
|
||||
// Somma Minuti Giocati da Player (SMG) nel DB
|
||||
$somma_minuti = $val->total_min;
|
||||
$tmp['somma_minuti'] = $somma_minuti;
|
||||
|
||||
// Aspettativa di Gioco
|
||||
// (AdG)
|
||||
$asp_gioco = $somma_goals / $somma_minuti * 90;
|
||||
$tmp['asp_gioco'] = $asp_gioco;
|
||||
$tmp['somma_minuti'] = $val->total_min;
|
||||
|
||||
// il valore corrispondente al ruolo del Player (esempio un giocatore in Details ha ruolo = RW
|
||||
// quindi Aspettativa Statistica (AS) per RW = 0.219)
|
||||
@@ -593,9 +584,38 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
|
||||
// dove X è un valore che dovrebbe essere parametrizzabile da una interfaccia.
|
||||
// Il valore iniziale lo fissiamo a X = 3
|
||||
// (AT)
|
||||
$tmp['asp_teorica_'.$bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value);
|
||||
switch ($bettype) {
|
||||
case 'goals':
|
||||
// Aspettativa di Gioco
|
||||
// (AdG)
|
||||
$asp_gioco = $val->goals / $somma_minuti * 90;
|
||||
$tmp['asp_teorica_goals'] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value);
|
||||
break;
|
||||
case 'cards':
|
||||
$asp_gioco = $val->cards / $somma_minuti * 90;
|
||||
$tmp['asp_teorica_cards'] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value);
|
||||
break;
|
||||
case 'fouls':
|
||||
$asp_gioco = $val->fouls / $somma_minuti * 90;
|
||||
$tmp['asp_teorica_fouls'] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value);
|
||||
break;
|
||||
case 'offsides':
|
||||
$asp_gioco = $val->offsides / $somma_minuti * 90;
|
||||
$tmp['asp_teorica_offsides'] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value);
|
||||
break;
|
||||
case 'total_shots':
|
||||
$asp_gioco = $val->total_shots / $somma_minuti * 90;
|
||||
$tmp['asp_teorica_total_shots'] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value);
|
||||
break;
|
||||
case 'shots_on_target':
|
||||
$asp_gioco = $val->shots_on_target / $somma_minuti * 90;
|
||||
$tmp['asp_teorica_shots_on_target'] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Calcolare la Somma di tutte le AT (colonna G della Tabella)
|
||||
// Considerare la ATR calcolata allo Step 1 (colonna I della Tabella)
|
||||
// Aspettativa per Player: AP = AT * ATR / TOT AT
|
||||
|
||||
Reference in new issue
Block a user