match

package
v0.0.0-...-c4e09bc Latest Latest
Warning

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

Go to latest
Published: May 4, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadMatch

func LoadMatch(matchIDs <-chan uint64, loaded chan<- MatchResult)

func LoadNewMatches

func LoadNewMatches() (int, error)

Types

type Action

type Action struct {
	Action   string
	Location []int
}

func (*Action) UnmarshalJSON

func (a *Action) UnmarshalJSON(b []byte) error

type History

type History struct {
	Moves [][]Move
}

func (*History) UnmarshalJSON

func (h *History) UnmarshalJSON(b []byte) error

type Match

type Match struct {
	R1ID int `json:"r1_id"`
	R2ID int `json:"r2_id"`

	R1Name string `json:"r1_name"`
	R2Name string `json:"r2_name"`

	R1Score int `json:"r1_score"`
	R2Score int `json:"r2_score"`

	R1Ranking int `json:"r1_ranking"`
	R2Ranking int `json:"r2_ranking"`

	R1Rating float64 `json:"r1_rating"`
	R2Rating float64 `json:"r2_rating"`

	R1Time float64 `json:"r1_time"`
	R2Time float64 `json:"r2_time"`

	Timestamp uint64
	Ranked    bool
	Seed      uint64
	KFactor   int `json:"k_factor"`
	State     int
	Winner    int

	Data MatchData
}

func (*Match) GridString

func (m *Match) GridString() string

func (*Match) SynthString

func (m *Match) SynthString() string

type MatchData

type MatchData struct {
	Score   []int
	History History
}

type MatchRecord

type MatchRecord struct {
	Timestamp uint64
	MatchID   uint64 `json:"match_id"`
}

func LoadNewRecords

func LoadNewRecords() ([]MatchRecord, error)

type MatchResult

type MatchResult struct {
	MatchID uint64
	Match   Match
	Err     error
}

type Move

type Move struct {
	PlayerID int `json:"player_id"`
	RobotID  int `json:"robot_id"`
	HP       int
	Location []int
	Action   Action
}

Jump to

Keyboard shortcuts

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