Add global score coefficient

This commit is contained in:
nemunaire 2021-09-06 11:58:03 +02:00
commit 105034ec8c
7 changed files with 20 additions and 9 deletions

View file

@ -6,6 +6,8 @@ import (
"strings"
)
var GlobalScoreCoefficient float64 = 1
// exportedExercice is a structure representing a challenge, as exposed to players.
type exportedExercice struct {
Title string `json:"title"`
@ -50,7 +52,7 @@ func ExportThemes() (interface{}, error) {
exercice.Headline,
exercice.URLId,
tags,
exercice.Gain,
int64(float64(exercice.Gain) * GlobalScoreCoefficient),
exercice.Coefficient,
exercice.SolvedCount(),
exercice.TriedTeamCount(),