Exemplo n.º 1
0
        public void SetRoom(PAIGOW_ROOM prRoom)
        {
            if (prRoom.hasRoomStatus())
            {
                roomStatus = prRoom.room_status;
            }

            if (prRoom.hasLoop())
            {
                currentLoop = prRoom.loop;
            }

            if (prRoom.hasMaxLoop())
            {
                maxLoop = prRoom.maxLoop;
            }

            if (prRoom.hasUnixtime())
            {
                Unixtime = prRoom.unixtime;
            }
            if (prRoom.hasRemainMahjong())
            {
                remainMahjong = prRoom.remainMahjong;
            }
            if (prRoom.hasLoopEnd())
            {
                loopEnd = prRoom.loopEnd;
            }

            if (prRoom.hasMahJongSum())
            {
                mahJongSum = prRoom.mahJongSum;
            }

            if (prRoom.hasDealTime())
            {
                dealTime = prRoom.dealTime;
            }

            if (prRoom.hasIsCutPan())
            {
                isCutPan = prRoom.isCutPan;
            }
            if (prRoom.hasIsBombPan())
            {
                isBombPan = prRoom.isBombPan;
            }

            List <PAIGOW_SEAT> prPokerList = prRoom.getPaigowSeatList();

            for (int i = 0; i < prPokerList.Count; i++)
            {
                if (prPokerList[i] != null && prPokerList[i].pos > 0 || prPokerList[i].playerId > 0)
                {
                    //--------------1-----------------
                    for (int j = 0; j < SeatList.Count; j++)
                    {
                        if (prPokerList[i].pos == SeatList[j].Pos)
                        {
                            SeatList[j].SetSeat(prPokerList[i]);
                            break;
                        }
                    }
                }
            }
        }