fix
This commit is contained in:
parent
d193a0c11c
commit
027333b4a2
|
@ -122,6 +122,18 @@ func (n *MachineDesc) BetChangeList() []float64 {
|
|||
}
|
||||
return lists
|
||||
}
|
||||
func (n *MachineDesc) GetBetIndexByVal(val float64) []int64 {
|
||||
betChangeListRows, ok := n.Sheet("Bet", "BetChangeList").(map[int64]*structs.BetChangeList)
|
||||
if !ok {
|
||||
panic(errors.ConfigTypeError.ErrorWith(n.Theme, "BetChangeList"))
|
||||
}
|
||||
for _, list := range betChangeListRows {
|
||||
if list.BetChangeList == val {
|
||||
return []int64{list.BetSizeIndex, list.BetLevelIndex}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (n *MachineDesc) GetVector(choice int64, minRatio, maxRatio float64, isForceWin bool) (int64, []int64) {
|
||||
if vectorIndex := config.GetInt64("slots.vectorIndex"); vectorIndex > 0 {
|
||||
rows := n.DefaultSheet("Vector").([]*structs.Vector)
|
||||
|
|
|
@ -45,6 +45,9 @@ func (m *Machine) BaseBets() []int64 {
|
|||
func (m *Machine) BetChangeList() []float64 {
|
||||
return m.MachineDesc.BetChangeList()
|
||||
}
|
||||
func (m *Machine) GetBetIndexByVal(val float64) []int64 {
|
||||
return m.MachineDesc.GetBetIndexByVal(val)
|
||||
}
|
||||
func (m *Machine) Choice() int64 {
|
||||
if m.UserData().ForceChoice > 0 {
|
||||
return m.UserData().ForceChoice
|
||||
|
|
Loading…
Reference in New Issue