leaderboard

package
Version: v0.0.0-...-5062497 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FullLeaderboard

type FullLeaderboard struct {
	// contains filtered or unexported fields
}

func FullLeaderboardFromSpace

func FullLeaderboardFromSpace(space *state.Space, clients []uint32) *FullLeaderboard

func (*FullLeaderboard) BuildLeaderboard

func (fullLeaderboard *FullLeaderboard) BuildLeaderboard(userRank Rank, userPosition uint16) *Leaderboard

func (*FullLeaderboard) BuildLeaderboards

func (fullLeaderboard *FullLeaderboard) BuildLeaderboards() []*Leaderboard

type Leaderboard

type Leaderboard struct {
	ClientId uint32
	// contains filtered or unexported fields
}

func (*Leaderboard) ToMessage

func (leaderboard *Leaderboard) ToMessage() *pb.Message

ToMessage returns protobuffer Message object with Leaderboard containing ordered Ranks.

func (*Leaderboard) ToProto

func (leaderboard *Leaderboard) ToProto() *pb.Leaderboard

ToProto returns protobuf representation

type Rank

type Rank struct {
	// contains filtered or unexported fields
}

func (*Rank) ToProto

func (rank *Rank) ToProto() *pb.Rank

ToProto returns protobuf representation

type SortableByScore

type SortableByScore []Rank

func (SortableByScore) Len

func (a SortableByScore) Len() int

func (SortableByScore) Less

func (a SortableByScore) Less(i, j int) bool

func (SortableByScore) Swap

func (a SortableByScore) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL