Documentation ¶
Index ¶
Constants ¶
View Source
const ( PRILIMINARY_ROUND = "preliminary" FINAL_ROUND = "final" )
View Source
const (
ALGORITHM_SKATING = "skating"
)
Variables ¶
View Source
var DUPLICATE_PLACEMENT_ERROR = func(placement int) error { return errors.New(fmt.Sprintf("placement %v is already taken by someone else", placement)) }
Functions ¶
This section is empty.
Types ¶
type DanceScoreSheet ¶
type DanceScoreSheet struct { }
func NewDanceScoreSheet ¶
func NewDanceScoreSheet() DanceScoreSheet
func (*DanceScoreSheet) AddJudgeMarks ¶
func (sheet *DanceScoreSheet) AddJudgeMarks(marks JudgeMarks)
func (DanceScoreSheet) CalculateDancePlacements ¶
func (sheet DanceScoreSheet) CalculateDancePlacements(algorithm, roundType string) ([][]int, error)
type JudgeMarks ¶
type JudgeMarks struct {
// contains filtered or unexported fields
}
func NewJudgeMarks ¶
func NewJudgeMarks(roundSize int) JudgeMarks
func (*JudgeMarks) AddCallback ¶
func (marks *JudgeMarks) AddCallback(coupleID int, callback bool)
func (*JudgeMarks) AddPlacement ¶
func (marks *JudgeMarks) AddPlacement(coupleID, placement int) error
AddPlacement adds judge's placement of couple to the marks. This function ensures that all couples receives a valid placement.
This method ensures compliance with Rule 4.
func (JudgeMarks) GetCallbacks ¶
func (marks JudgeMarks) GetCallbacks() []int
GetCallbacks retrieves all the couples that are called back by the adjudicator.
This method ensures compliance with Rule 1.
func (JudgeMarks) GetCouples ¶
func (marks JudgeMarks) GetCouples() []int
func (JudgeMarks) GetPlacements ¶
func (marks JudgeMarks) GetPlacements() [][]int
type RoundScoreSheet ¶
type RoundScoreSheet struct { }
func NewRoundScoreSheet ¶
func NewRoundScoreSheet() RoundScoreSheet
func (*RoundScoreSheet) AddDanceSheet ¶
func (sheet *RoundScoreSheet) AddDanceSheet(danceSheet DanceScoreSheet)
func (RoundScoreSheet) CalculateRoundPlacements ¶
func (sheet RoundScoreSheet) CalculateRoundPlacements(algorithm string) ([][]int, error)
Click to show internal directories.
Click to hide internal directories.