Documentation ¶
Index ¶
- type DefaultScorer
- func (s *DefaultScorer) ApplyHistoryToChart(ch *game.Chart, history *History) *game.Chart
- func (s *DefaultScorer) ApplyInputToChart(chart *game.Chart, input *game.Input, rate uint16) (note *game.Note, distance, absDistance time.Duration)
- func (s *DefaultScorer) Deinit()
- func (s *DefaultScorer) Distance(rate uint16, expected, actual time.Duration) time.Duration
- func (s *DefaultScorer) DistanceFloat(rate uint16, expected, actual time.Duration) time.Duration
- func (s *DefaultScorer) GetClosestNote(chart *game.Chart, input *game.Input, rate uint16) (note *game.Note, distance, abs time.Duration)
- func (s *DefaultScorer) Init() error
- func (s *DefaultScorer) Load(c *game.Chart) []History
- func (s *DefaultScorer) Save(c *game.Chart, inputs *[]game.Input, rate uint16)
- func (s *DefaultScorer) Score(chart *game.Chart, history *History) Score
- type History
- type InputsCompact
- type Score
- type Scorer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultScorer ¶
type DefaultScorer struct {
// contains filtered or unexported fields
}
func (*DefaultScorer) ApplyHistoryToChart ¶
func (*DefaultScorer) ApplyInputToChart ¶
func (*DefaultScorer) Deinit ¶
func (s *DefaultScorer) Deinit()
func (*DefaultScorer) DistanceFloat ¶
func (*DefaultScorer) GetClosestNote ¶
func (s *DefaultScorer) GetClosestNote(chart *game.Chart, input *game.Input, rate uint16) (note *game.Note, distance, abs time.Duration)
Binary search for closest note, game.Chart should be in order
func (*DefaultScorer) Init ¶
func (s *DefaultScorer) Init() error
type InputsCompact ¶
type Scorer ¶
type Scorer interface { Init() error Deinit() // Save the state of this performance Save(chart *game.Chart, inputs *[]game.Input, rate uint16) // Load up previous state for the chart Load(chart *game.Chart) []History Score(chart *game.Chart, history *History) Score ApplyInputToChart(chart *game.Chart, input *game.Input, rate uint16) (note *game.Note, distance, absDistance time.Duration) Distance(rate uint16, expected, actual time.Duration) time.Duration }
Click to show internal directories.
Click to hide internal directories.