/// <summary> /// /// 进入2~6人后处理的 /// </summary> /// <param name="tablenum"></param> /// <param name="userList"></param> public BullFight100Table(int gameid, BaseRoom _room2, int tablenum, BullFight100User _firstUser, cs_enterroom _data) { _numpertable = 1; _roomid = _room2.mRoomID; _room = _room2 as BullFight100Room; _tableid = tablenum; _baseMoney = 1; _bankpos = 1; if (_DicPos2User == null) { _DicPos2User = new ConcurrentDictionary <int, BullFight100User>(); } ConcurrentDictionary <int, BaseUser> _temppos2user = new ConcurrentDictionary <int, BaseUser>(); _quePosGetBanker = new ConcurrentQueue <int>(); _quePosGetBanker.Enqueue(_bankpos); //================测试数据 _firstUser._tableID = tablenum; //赋值桌子号 _DicPos2User.TryAdd(1, _firstUser); //1~3表示位置 _temppos2user.TryAdd(1, _firstUser); _masterPos = 1; //房主,只做建房用 _judge = new BullFight100Judge(this); _judge.InitiArgs(_data); base._gametype = _judge._gametype; _tableMaxCount = _judge.GetTableorBankerMaxCount; _TurnWaitTime = 15; base.Initi(_temppos2user, _judge._minLimit, _judge._maxLimit, gameid, BF100SendDataServer.instance, DoTableTimer); base.EnterTable(); _strStatus = "BullFightTable...1"; }
/// <summary> /// 重置此桌信息 /// </summary> public void Reset(bool _no_again) { lock (objLock) { _strStatus = "Reset... "; ForeashAllDo((i) => { BullFight100User _tempuser = _DicPos2User[i]; _tempuser._isBanker = false; _tempuser._isGetBanker = false; _tempuser._bulltype = PokerBullFightType.Bull_No; _tempuser._pos2Gameble = new Dictionary <int, int>(); _tempuser._gambleTotal = 0; _tempuser._showCardList = new List <int>(); _tempuser._SysDealTimeOutCount = 0; _tempuser._gambletime = DateTime.Now.AddYears(100); // _tempuser._WaitClientLimitCount = 0; }); base.ResetBase(_no_again); ForeashAllDo((i) => { if (i <= 2) { return; } BullFight100User _tempu; _DicPos2User.TryRemove(i, out _tempu); }); //不在的用户处理掉 ForeashAllDo((i) => { if (!_pos2userbase.ContainsKey(i)) { BullFight100User _tempu; _DicPos2User.TryRemove(i, out _tempu); } }); if (_numpertable < base._num_min) { _tablestatus = TableStatusEnum.WaitforReady; //人数不够了,,停止下局的自动准备 } if (_no_again) { _DicPos2User = null; _judge = null; BullFight100Room myr = BullFight100Lobby.instance.GetRoomByRoomID(_roomid); if (myr != null) { myr.ResetTableByTableID(_tableid); } _tableid = 0; } else { //金币模式 才需要自动开始 ForeashAllDo((i) => { _DicPos2User[i].SetTimeOutAction(1, "sc_tablestart_bf100_n", 1); }); //自动开始下一步 Start(); } } }