scores

package
v0.0.0-...-f43a398 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDir

func ParseDir(dirPath string) (scores map[string][]Score, err error)

func Summarize

func Summarize(pscores map[string][]Score) map[string]Summary

Types

type Score

type Score struct {
	File     string
	Sections map[string]Section
}

func Parse

func Parse(file string, content string) (score Score, err error)

func ParseFile

func ParseFile(filePath string) (score Score, err error)

func (*Score) Evolutions

func (score *Score) Evolutions() (evolutions int64)

func (*Score) MachinesHacked

func (score *Score) MachinesHacked() (total int64)

func (*Score) Player

func (score *Score) Player() (player string)

func (*Score) Result

func (score *Score) Result() (result string)

func (*Score) RobotsDestroyed

func (score *Score) RobotsDestroyed() (total int64)

func (*Score) TotalScore

func (score *Score) TotalScore() (total int64)

func (*Score) Turns

func (score *Score) Turns() (total int64)

func (*Score) Version

func (score *Score) Version() (version string)

type Section

type Section struct {
	Header     string
	Content    interface{}
	Subsection map[string]Section
}

type Summary

type Summary struct {
	Player            string
	Games             int64
	AverageScore      int64
	LowestScore       int64
	HighestScore      int64
	CountedScore      int64
	CumulativeScore   int64
	HighestEvolutions int64
	Wins              int64
	Turns             int64
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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