sync: implement hint dependency on flags

This commit is contained in:
nemunaire 2019-10-26 11:33:30 +02:00
commit 6740256a32
6 changed files with 72 additions and 2 deletions

View file

@ -168,7 +168,7 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
for _, h := range hints {
if t == nil || HintCoefficient < 0 || t.HasHint(h) {
exercice.Hints = append(exercice.Hints, myTeamHint{h.Id, h.Title, h.Content, h.File, h.Cost})
} else {
} else if t.CanSeeHint(h) {
exercice.Hints = append(exercice.Hints, myTeamHint{h.Id, h.Title, "", "", h.Cost})
}
}