faceoff

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2018 License: MIT Imports: 13 Imported by: 0

README

faceoff

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contender

type Contender int
const (
	A    Contender = 0
	B    Contender = 1
	NONE Contender = -1
)

type Match

type Match struct {
	Contenders [2]string
	Score      [2]int
	Winner     Contender
}

func NewMatch

func NewMatch(contenderA string, contenderB string) *Match

func (*Match) WinA

func (m *Match) WinA()

func (*Match) WinB

func (m *Match) WinB()

type Roster

type Roster struct {
	UUID   []byte
	Rounds []*Round
}

func CreateRoster

func CreateRoster(participants []string) (*Roster, error)

func CreateRosterRaw

func CreateRosterRaw(participants []byte) (*Roster, error)

func ParseRoster

func ParseRoster(r io.ReadCloser) (*Roster, error)

func (*Roster) AddVotes

func (r *Roster) AddVotes(vote *Roster)

func (*Roster) AdvanceRound

func (r *Roster) AdvanceRound()

func (*Roster) DeepCopy

func (r *Roster) DeepCopy() *Roster

type Round

type Round struct {
	Matches []*Match
}

type TemplateSet

type TemplateSet struct {
	Templates map[string]string
}

func LoadTemplatesFromDisk

func LoadTemplatesFromDisk() (*TemplateSet, error)

func LoadTemplatesFromGob

func LoadTemplatesFromGob(b []byte) (*TemplateSet, error)

func (*TemplateSet) EncodeGob

func (ts *TemplateSet) EncodeGob() ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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