Round score instead of floor + display score100 to player
This commit is contained in:
parent
a0cb395c79
commit
9f25bc54d3
3 changed files with 5 additions and 4 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"math"
|
||||
"os"
|
||||
"path"
|
||||
"sort"
|
||||
|
|
@ -124,8 +125,8 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
|
|||
ret.Name = t.Name
|
||||
ret.Id = t.Id
|
||||
points, _ := t.GetPoints()
|
||||
ret.Points = int64(float64(points) * GlobalScoreCoefficient)
|
||||
ret.Points100 = int64(float64(points) * GlobalScoreCoefficient * 100)
|
||||
ret.Points = int64(math.Round(float64(points) * GlobalScoreCoefficient))
|
||||
ret.Points100 = int64(math.Round(float64(points) * GlobalScoreCoefficient * 100))
|
||||
if members, err := t.GetMembers(); err == nil {
|
||||
ret.Members = members
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue