/// <summary>
 /// 此桌结束了,一次比完牌就结束
 /// </summary>
 private void UserEnd(int userid)
 {
     lock (objLock)
     {
         BullFight100User myu = GetUserByID(userid);
         if (myu == null)
         {
             return;
         }
         if (!myu.CheckFirstDeal())
         {
             return;
         }
         //if (HaveSomeBodyUnDeal()) return;
         DoExecuteAllEnd(false);
     }
 }
        /// <summary>
        /// 至少两人到位了进行 开局 ,开局就会扣掉配置钱===============================================
        /// </summary>
        private void Start(int userid)
        {
            lock (objLock)
            {
                BullFight100User myu = GetUserByID(userid);
                if (myu == null)
                {
                    return;
                }
                if (myu.CheckisWatch())
                {
                    return;
                }
                if (!myu.CheckFirstDeal())
                {
                    return;
                }
                //if (HaveSomeBodyUnDeal()) return;
                if (_numpertable < _num_min)
                {
                    return;
                }

                base.StartBase(60 * 4);
                _pos2UserID   = new Dictionary <int, int>();
                _pos2IPPort   = new Dictionary <int, string>();
                _pos2Money    = new Dictionary <int, decimal>();
                _pos2Win      = new Dictionary <int, bool>();
                _pos2CardList = new Dictionary <int, List <int> >();
                _pos2BullRate = new Dictionary <int, int>();
                _pos2Watch    = new Dictionary <int, int>();

                Queue <int> _tcardLeft = new Queue <int>();
                var         type       = _judge._gametype;
                _dicPokerList        = new Dictionary <int, List <int> >();
                _dicPokerBFType      = new Dictionary <int, PokerBullFightType>();
                _dicPokerGambleTotal = new Dictionary <int, int>();
                _pos2GambleTable     = new Dictionary <int, int>();

                _allGambleTotal = 0;
                _dicPokerList   = BullFight.DistributePoker(out _tcardLeft, 4);
                foreach (int key in _dicPokerList.Keys)
                {
                    _dicPokerBFType.Add(key, BullFight.GetBullType(_dicPokerList[key]));
                    _dicPokerGambleTotal.Add(key, 0);
                }

                ////Dictionary<int, int> _pos2RobotAI = new Dictionary<int, int>();
                ////ForeashAllDo((i) =>
                ////{
                ////    _pos2RobotAI.Add(i, _DicPos2User[i]._tbUser.winpercent); //_pos2RobotAI.Add(i, i == 1 ? 101 : 0);
                ////});
                ////_judge.ChangePokerByRobotAI(_pos2RobotAI, _dicPokerList);

                List <int> _temppoker0 = new List <int>()
                {
                    0, 0, 0, 0, 0
                };
                List <UserIDMSG>      imList  = new List <UserIDMSG>();
                List <CommonPosValSD> _uplist = new List <CommonPosValSD>();

                _judge.DealReduceDiamond();//执行扣房卡 已处理只扣一次
                _judge.SetCurTableorBankerCount();

                //同时把每位玩家的数据确认修改了 //发送消息到所有玩家
                ForeashAllDo((i) =>
                {
                    BullFight100User tempUser = _DicPos2User[i];

                    tempUser._isPlaying = true;
                    //tempUser._shouPaiArr = _pokerList[i];
                    tempUser._pos2Gameble  = new Dictionary <int, int>();
                    tempUser._showCardList = new List <int>()
                    {
                        0, 0, 0, 0, 0
                    };
                    _DicPos2User[i] = tempUser;//必须要赋值回去 要求有3个返馈才处理

                    _tablRecord.MatchCode = _tableMathCode;
                    _tablRecord._guid     = _guid;
                    _tablRecord.StartTime = DateTime.Now;
                    _pos2UserID.Add(i, tempUser._userid);
                    _pos2IPPort.Add(i, tempUser._IPandPort);
                    //发送通知消息
                    sc_tablestart_bf100_n _start = new sc_tablestart_bf100_n()
                    {
                        result = 1, fn = "sc_tablestart_bf100_n", _msgid = _TurnWaitTime
                    };
                    _start.tableid = _tableid;
                    _start.pos     = i;

                    _start._canGetBanker   = false;
                    _start._pos2userid     = _uplist;//所有玩家及对应 的位置信息
                    _start._curTableCount  = _judge._curTableOverCount;
                    _start._curBankerCount = 1;
                    _start.ShowCardList    = _temppoker0;
                    _start.closefun        = true;//需要抢庄,不关闭自动显示功能
                    imList.Add(new UserIDMSG(tempUser._userid, JsonUtils.Serialize(_start), tempUser._isRobot, tempUser._isDisconnet));
                });

                BF100SendDataServer.instance.SendDataDelay(imList);
                _tableSendData.Add(imList);
                _strStatus = "Start...3  ";

                DoExecuteSetBanker();
            }
        }