Versions in this module Expand all Collapse all v1 v1.1.3 Dec 24, 2018 v1.1.2 Dec 2, 2018 v1.1.1 Nov 29, 2016 Changes in this version + func CalcTeamsBase(database *sql.DB) (z float64, err error) + func LastAccept(teamID int, flags []db.Flag) int64 + type ByScoreAndLastAccept []TeamScoreInfo + func (tr ByScoreAndLastAccept) Len() int + func (tr ByScoreAndLastAccept) Less(i, j int) bool + func (tr ByScoreAndLastAccept) Swap(i, j int) + type CategoryInfo struct + Name string + TasksInfo []TaskInfo + type Game struct + AutoOpen bool + AutoOpenTimeout time.Duration + End time.Time + OpenTimeout time.Duration + Start time.Time + TaskPrice struct{ ... } + func NewGame(database *sql.DB, start, end time.Time, teamBase float64) (g Game, err error) + func (g *Game) SetTaskPrice(p500, p400, p300, p200 int) + func (g *Game) SetTeamsBase(teams int) + func (g *Game) TeamsBaseUpdater(database *sql.DB, updateTimeout time.Duration) + func (g Game) OpenNextTask(t db.Task) (err error) + func (g Game) RecalcScoreboard() (err error) + func (g Game) Run() (err error) + func (g Game) Scoreboard() (scores []TeamScoreInfo, err error) + func (g Game) Solve(teamID, taskID int, flag string) (solved bool, err error) + func (g Game) Tasks() (cats []CategoryInfo, err error) + type TaskInfo struct + Author string + Desc string + DescEn string + ForceClosed bool + ID int + Level int + Name string + NameEn string + Opened bool + OpenedTime time.Time + Price int + SolvedBy []int + Tags string + type TeamScoreInfo struct + Desc string + ID int + LastAccept int64 + Name string + Score int