Skip to content

Commit

Permalink
Merge pull request kestasjk#693 from Squigs44/grIntegration
Browse files Browse the repository at this point in the history
small change on gr initialization
  • Loading branch information
jmo1121109 authored Jun 26, 2020
2 parents 4d166a1 + 3bdd583 commit 1b3a97e
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions ghostratings/calculations.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,29 @@ public function __construct($gameID, $SCcounts, $memberStatus, $variantID, $pres
$this->gameTurns = $gameTurns;
$this->gameStatus = $gameStatus;
$this->phaseMinutes = $phaseMinutes;
$this->variantMod = Config::$grVariantMods[$this->variantID];
if (isset(Config::$grVariantMods[$this->variantID]))
{
$this->variantMod = Config::$grVariantMods[$this->variantID];
}
else
{
$this->variantMod = 1;
}
$this->victorySC = $victorySC;
$this->variantSC = $variantSC;
$this->winner = $winner;
$this->botGame = $botGame;
$this->time = $time;
$this->k = 32; //A higher k value means players will move faster up and down in rankings.
$this->start = 100; //32 and 100 are arbitrary numbers used for scaling in 1v1 rankings.
$this->pressMod = Config::$grPressMods[$this->pressType];
if (isset(Config::$grPressMods[$this->pressType]))
{
$this->pressMod = Config::$grPressMods[$this->pressType];
}
else
{
$this->pressMod = 1;
}
$this->modvalue = (17.5 * $this->variantMod * $this->pressMod); //17.5 is the 'k' value for non 1v1 games and is used for scaling.
}

Expand Down

0 comments on commit 1b3a97e

Please sign in to comment.