mirror of
https://github.com/furyfire/trueskill.git
synced 2025-03-21 09:08:04 +00:00
Fixed an array size issue because of ignored 0 value
This commit is contained in:
@ -29,9 +29,10 @@ class PlayerSkillsToPerformancesLayer extends TrueSkillFactorGraphLayer
|
||||
{
|
||||
$currentTeamPlayerPerformances = array();
|
||||
|
||||
foreach ($currentTeam as $playerSkillVariable)
|
||||
foreach ($currentTeam as &$playerSkillVariable)
|
||||
{
|
||||
$playerPerformance = $this->createOutputVariable($playerSkillVariable->getKey());
|
||||
$currentPlayer = &$playerSkillVariable->getKey();
|
||||
$playerPerformance = $this->createOutputVariable($currentPlayer);
|
||||
$newLikelihoodFactor = $this->createLikelihood($playerSkillVariable, $playerPerformance);
|
||||
$this->addLayerFactor($newLikelihoodFactor);
|
||||
$currentTeamPlayerPerformances[] = $playerPerformance;
|
||||
|
Reference in New Issue
Block a user