Documentation ¶
Index ¶
- Constants
- func ParseMap(Map Chart) (parsedMap ParsedChart, irregularInfo IrregularInfo)
- type BestdoriV2BasicNote
- type BestdoriV2Chart
- func (formatChart BestdoriV2Chart) Decode() (Chart Chart)
- func (formatChart *BestdoriV2Chart) Encode(chart Chart) error
- func (formatChart BestdoriV2Chart) Len() int
- func (formatChart BestdoriV2Chart) Less(i, j int) bool
- func (formatChart BestdoriV2Chart) MapCheck() (result bool, err error)
- func (formatChart BestdoriV2Chart) Swap(i, j int)
- type BestdoriV2Note
- type BpmInfo
- type Chart
- type DifficultyDescription
- type Distribution
- type Float64Heap
- type HandType
- type InputMap
- type IrregularInfo
- type MapDifficultyExtend
- type MapDifficultyStandard
- type MapInfo
- type MapMetricsBasic
- type MapMetricsExtend
- type MapMetricsStandard
- type Note
- type NoteCount
- type NoteType
- type ParsedChart
- type ParsedNote
- type RegularType
- type SlideStatus
Constants ¶
View Source
const ( DifficultyLow = -1 // 该项难度偏低 DifficultyNormal = 0 // 该项难度正常 DifficultyHigh = 1 // 该项难度偏高 )
Variables ¶
This section is empty.
Functions ¶
func ParseMap ¶
func ParseMap(Map Chart) (parsedMap ParsedChart, irregularInfo IrregularInfo)
ParseMap 拆谱拆谱、输入的谱排序好先
Types ¶
type BestdoriV2BasicNote ¶
type BestdoriV2Chart ¶
type BestdoriV2Chart []BestdoriV2Note
func (BestdoriV2Chart) Decode ¶
func (formatChart BestdoriV2Chart) Decode() (Chart Chart)
func (*BestdoriV2Chart) Encode ¶
func (formatChart *BestdoriV2Chart) Encode(chart Chart) error
func (BestdoriV2Chart) Len ¶
func (formatChart BestdoriV2Chart) Len() int
func (BestdoriV2Chart) Less ¶
func (formatChart BestdoriV2Chart) Less(i, j int) bool
func (BestdoriV2Chart) MapCheck ¶
func (formatChart BestdoriV2Chart) MapCheck() (result bool, err error)
func (BestdoriV2Chart) Swap ¶
func (formatChart BestdoriV2Chart) Swap(i, j int)
type BestdoriV2Note ¶
type BestdoriV2Note struct { BestdoriV2BasicNote Type string `json:"type"` BPM float64 `json:"bpm,omitempty"` Connections []BestdoriV2BasicNote `json:"connections,omitempty"` Direction string `json:"direction,omitempty"` Width int `json:"width,omitempty"` }
func (BestdoriV2Note) Beat ¶
func (note BestdoriV2Note) Beat() (value float64)
func (BestdoriV2Note) Lane ¶
func (note BestdoriV2Note) Lane() (value float64)
type Chart ¶
type Chart []Note
func (Chart) InitParseChart ¶
func (chart Chart) InitParseChart() (ParsedChart ParsedChart)
type DifficultyDescription ¶
type DifficultyDescription int
type Distribution ¶
type Float64Heap ¶
type Float64Heap []float64
func (*Float64Heap) GetTopRankAverage ¶
func (h *Float64Heap) GetTopRankAverage() (average float64)
GetTopRankAverage 从5%~30%部分
func (Float64Heap) Len ¶
func (h Float64Heap) Len() int
func (Float64Heap) Less ¶
func (h Float64Heap) Less(i, j int) bool
func (*Float64Heap) Pop ¶
func (h *Float64Heap) Pop() interface{}
func (*Float64Heap) Push ¶
func (h *Float64Heap) Push(x interface{})
func (Float64Heap) Swap ¶
func (h Float64Heap) Swap(i, j int)
type IrregularInfo ¶
type IrregularInfo struct { Irregular RegularType `json:"irregular"` // 存在多压/交叉(出张)0 失败 1 标准 2 非标准 IrregularInfo string `json:"irregular_info"` // 无法分析的第一个错误情况 }
type MapDifficultyExtend ¶
type MapDifficultyExtend struct { MaxSpeed DifficultyDescription `json:"max_speed"` FingerMaxHPS DifficultyDescription `json:"finger_max_hps"` FlickNoteInterval DifficultyDescription `json:"flick_note_interval"` NoteFlickInterval DifficultyDescription `json:"note_flick_interval"` }
MapDifficultyExtend 扩展部分,要求正常谱面,非正常时为nil
func ExtendDifficultyGetter ¶
func ExtendDifficultyGetter(metrics MapMetricsExtend, diff int, level float64) (ExtendDifficulty *MapDifficultyExtend)
ExtendDifficultyGetter 获得标准 谱面难度 信息,除了Irregular项
type MapDifficultyStandard ¶
type MapDifficultyStandard struct { TotalNPS float64 `json:"total_nps"` TotalHPS float64 `json:"total_hps"` MaxScreenNPS float64 `json:"max_screen_nps"` Difficulty float64 `json:"difficulty"` BlueWhiteDifficulty float64 `json:"blue_white_difficulty"` }
MapDifficultyStandard 基础部分,不要求正常谱面
func StandardDifficultyGetter ¶
func StandardDifficultyGetter(metrics MapMetricsStandard, diff int) (StandardDifficulty MapDifficultyStandard, newDiff int)
StandardDifficultyGetter 获得标准 谱面难度 信息,除了Irregular项
type MapInfo ¶
type MapInfo struct { MapMetrics *MapMetricsStandard `json:"map_metrics"` MapMetricsExtend *MapMetricsExtend `json:"map_metrics_extend,omitempty"` MapDifficulty *MapDifficultyStandard `json:"map_difficulty"` MapDifficultyExtend *MapDifficultyExtend `json:"map_difficulty_extend,omitempty"` }
type MapMetricsBasic ¶
type MapMetricsBasic struct { IrregularInfo TotalNote int `json:"total_note"` TotalTime float64 `json:"total_time"` TotalNPS float64 `json:"total_nps"` SPRhythm bool `json:"sp_rhythm"` }
MapMetricsBasic 将会放入数据库存档的数据部分
type MapMetricsExtend ¶
type MapMetricsExtend struct { LeftPercent float64 `json:"left_percent"` MaxSpeed float64 `json:"max_speed"` FingerMaxHPS float64 `json:"finger_max_hps"` FlickNoteInterval float64 `json:"flick_note_interval"` NoteFlickInterval float64 `json:"note_flick_interval"` }
MapMetricsExtend 扩展部分,要求正常谱面,非正常时为nil
type MapMetricsStandard ¶
type MapMetricsStandard struct { MapMetricsBasic BpmInfo TotalHitNote int `json:"total_hit_note"` MaxScreenNPS float64 `json:"max_screen_nps"` TotalHPS float64 `json:"total_hps"` NoteCount NoteCount Distribution Distribution }
MapMetricsStandard 基础部分,不要求正常谱面
func StandardInfoGetter ¶
func StandardInfoGetter(Map Chart) (StandardInfo MapMetricsStandard)
StandardInfoGetter 获得标准谱面信息,除了Irregular项
type Note ¶
type Note struct { Type NoteType // 音符类型 BPM float64 // BPM信息 Beat float64 // 节拍数 Time float64 // 判定时间 Lane float64 // 轨道号 Direction int // 左右滑建,普通滑键的大小:-3~-1 左滑键;0 普通滑建;1~3右滑建 Pos int // type为NoteType_Slide时,所属的绿条编号 Status SlideStatus // 是否为最后一个SlideTick Flick bool // 是否为粉键/滑键 Hidden bool // 是否为隐藏音符 }
type NoteCount ¶
type NoteCount struct { Single int `json:"single"` Flick int `json:"flick"` SlideStart int `json:"slide_start"` SlideTick int `json:"slide_tick"` SlideEnd int `json:"slide_end"` SlideFlick int `json:"slide_flick"` SlideHidden int `json:"slide_hidden"` DirectionLeft int `json:"direction_left"` DirectionRight int `json:"direction_right"` }
type ParsedChart ¶
type ParsedChart []ParsedNote
func (ParsedChart) Len ¶
func (chart ParsedChart) Len() int
func (ParsedChart) Less ¶
func (chart ParsedChart) Less(i, j int) bool
func (ParsedChart) Swap ¶
func (chart ParsedChart) Swap(i, j int)
type ParsedNote ¶
type ParsedNote struct { Note Hand HandType NotePrevious *ParsedNote NoteAfter *ParsedNote }
func (ParsedNote) GetGapFront ¶
func (note ParsedNote) GetGapFront() (gap float64)
func (ParsedNote) GetInterval ¶
func (note ParsedNote) GetInterval(note2 *ParsedNote) (interval float64)
func (ParsedNote) GetIntervalBack ¶
func (note ParsedNote) GetIntervalBack() (interval float64)
func (ParsedNote) GetIntervalFront ¶
func (note ParsedNote) GetIntervalFront() (interval float64)
type RegularType ¶
type RegularType int
const ( RegularTypeUnknown RegularType = iota RegularTypeRegular RegularTypeIrregular )
Click to show internal directories.
Click to hide internal directories.