func dbGetMaxGame(t *llrb.LLRB) int { max := t.Max() if max == nil { return 0 } return max.(*game).id }
func IterateOne(tree *llrb.LLRB, last Int64) Int64 { var next Int64 tree.AscendGreaterOrEqual(last, func(i llrb.Item) bool { if i.(Int64) == last { return true } else { next = i.(Int64) return false } }) return next }
func dbLookupGame(t *llrb.LLRB, gameid int) *game { g := &game{id: gameid} result := t.Get(g) if result != nil { g = result.(*game) return g } return nil }