refactored scoressstructures
This commit is contained in:
parent
e9ed9d910c
commit
191235b246
@ -23,18 +23,6 @@ class OnScoresStructure extends CommonScoresStructure {
|
||||
|
||||
$jsonObj = $this->getPlainJsonObject();
|
||||
|
||||
foreach ($jsonObj->teams as $team) {
|
||||
//if($this instanceof OnScoresStructure)
|
||||
$teamScore = new TeamScore();
|
||||
$teamScore->setId($team->id);
|
||||
$teamScore->setName($team->name);
|
||||
$teamScore->setRoundPoints($team->roundpoints);
|
||||
$teamScore->setMatchPoints($team->matchpoints);
|
||||
$teamScore->setMapPoints($team->mappoints);
|
||||
|
||||
$this->teamScores[$team->id] = $teamScore; //TODO verify that different teams have different ids
|
||||
}
|
||||
|
||||
foreach ($jsonObj->players as $jsonPlayer) {
|
||||
$playerScore = new PlayerScore();
|
||||
$playerScore->setPlayer($this->maniaControl->getPlayerManager()->getPlayer($jsonPlayer->login));
|
||||
|
@ -21,17 +21,6 @@ class OnScoresStructure extends CommonScoresStructure {
|
||||
|
||||
$jsonObj = $this->getPlainJsonObject();
|
||||
|
||||
foreach ($jsonObj->teams as $team) {
|
||||
$teamScore = new TeamScore();
|
||||
$teamScore->setId($team->id);
|
||||
$teamScore->setName($team->name);
|
||||
$teamScore->setRoundPoints($team->roundpoints);
|
||||
$teamScore->setMatchPoints($team->matchpoints);
|
||||
$teamScore->setMapPoints($team->mappoints);
|
||||
|
||||
$this->teamScores[$team->id] = $teamScore; //TODO verify that different teams have different ids
|
||||
}
|
||||
|
||||
foreach ($jsonObj->players as $jsonPlayer) {
|
||||
$playerScore = new PlayerScore();
|
||||
$playerScore->setPlayer($this->maniaControl->getPlayerManager()->getPlayer($jsonPlayer->login));
|
||||
|
Loading…
Reference in New Issue
Block a user