package main import ( "common/beegomap" "common/logger" // "fmt" "log" "math/rand" "net" "time" ) type RoomInfo struct { rid uint32 ids []uint32 } const ( STATE_PLAYER_INIT = 0 //init STATE_PLAYER_LOGINED = 1 //after login STATE_PLAYER_ENTERED = 2 //in room STATE_PLAYER_ON_TABLE = 3 //on table STATE_PLAYER_ON_TABLE_SitDown = 4 //sit down STATE_PLAYER_ON_TABLE_SitOut = 5 //sit out BUYIN_AMOUNT = 1000 Min_Message_Size = 16 ) type PlayerInfo struct { uid uint32 rid uint32 seq uint32 conn net.Conn isHost bool state uint32 leftMoney uint32 buyin uint32 ActionSeq int32 roundBet uint32 seatid int32 startRecordSeq bool recordSeq int valid bool lastCheckTime int64 enterStateTime int64 isObserver bool } var ( m_map_rooms *beegomap.BeeMap m_map_players *beegomap.BeeMap m_map_club_creater *beegomap.BeeMap ) func init() { m_map_rooms = beegomap.NewBeeMap() m_map_players = beegomap.NewBeeMap() m_map_club_creater = beegomap.NewBeeMap() } func Start(roomcount, invertal int) { //init all host player & conn InitAllHost(roomcount) HostLogin(invertal) } func InitAllHost(roomcount int) { for i:=0;i