private void LimitResources(ChangePlayerStatsParam changePlayerStats) { LimitResource(changePlayerStats.Resources.Black); LimitResource(changePlayerStats.Resources.Blue); LimitResource(changePlayerStats.Resources.Green); LimitResource(changePlayerStats.Resources.Red); LimitResource(changePlayerStats.Resources.Yellow); }
private void LimitVictoryPoints(ChangePlayerStatsParam changePlayerStats) { changePlayerStats.VictoryPoints = Math.Max(0, Math.Min(changePlayerStats.VictoryPoints, 30)); }