34 lines
599 B
Go
34 lines
599 B
Go
package model
|
|
|
|
import "roserver/serverproto"
|
|
|
|
type FruitPlayer struct {
|
|
Uid uint64
|
|
Name string
|
|
Online bool
|
|
|
|
ChipNum int32
|
|
CurrBetInfo map[int32]int32
|
|
|
|
CurrAwardChipNum int32
|
|
CurrAwardChipInfo []*serverproto.FruitSlotInfo
|
|
}
|
|
|
|
func newFruitPlayer(uid uint64, name string) *FruitPlayer {
|
|
player := &FruitPlayer{
|
|
Uid: uid,
|
|
Name: name,
|
|
CurrBetInfo: make(map[int32]int32),
|
|
CurrAwardChipNum: 0,
|
|
}
|
|
player.ResetBetInfo()
|
|
return player
|
|
}
|
|
|
|
func (self *FruitPlayer) ResetBetInfo() {
|
|
var i int32
|
|
for i = 1; i <= 8; i++ {
|
|
self.CurrBetInfo[i] = 0
|
|
}
|
|
}
|