Ejemplo n.º 1
0
        public void ChipInDouble(int playerId)
        {
            Seat seat = GetJionSeatByPlayerId(playerId);

            if (IsNotPassedCheck(seat))
            {
                return;
            }
            bool    iHadLook     = seat.IsLooked;
            decimal chipInAmount = 2 * PreSeatAmount;

            if (iHadLook != PreSeatIsLook)
            {
                if (PreSeatIsLook)
                {
                    chipInAmount = chipInAmount / 2;
                }
                else
                {
                    chipInAmount = chipInAmount * 2;
                }
            }
            if (chipInAmount > LimitAmount)
            {
                chipInAmount = LimitAmount;
            }
            //if (IsDecutMoneySuccess(seat.IPlayer, chipInAmount)) {
            //    MoveToNextSeat(chipInAmount, iHadLook,playerId, EChipinType.Double);
            //}
            if (seat.ChipIn(chipInAmount, IsDecutMoneySuccess, EChipinType.Double))
            {
                MoveToNextSeat(chipInAmount, iHadLook, playerId, EChipinType.Double);
            }
        }
Ejemplo n.º 2
0
        public object ChipIn(int playerId, decimal amount)
        {
            Seat seat = GetJionSeatByPlayerId(playerId);

            if (IsNotPassedCheck(seat))
            {
                return(new {
                    rl = ""
                });
            }
            bool iHadLook = seat.IsLooked;

            if (PreSeatIsLook && !iHadLook)
            {
                if (IsAmountLessThanPre(amount * 2))
                {
                    return(new {
                        rl = "金额有误,不能低于上家金额"
                    });
                }
            }
            if (!PreSeatIsLook && iHadLook)
            {
                if (IsAmountLessThanPre(amount / 2))
                {
                    return(new {
                        rl = "上家是暗注,你金额有误"
                    });
                }
            }
            if (IsAmountLessThanPre(amount))
            {
                return(new {
                    rl = "金额有误,不能低于上家金额"
                });
            }
            if (amount > LimitAmount)
            {
                amount = LimitAmount;
            }
            //if (IsDecutMoneySuccess(seat.IPlayer, amount)) {
            //    MoveToNextSeat(amount, iHadLook,playerId, EChipinType.ChipIn);
            //}
            if (seat.ChipIn(amount, IsDecutMoneySuccess, EChipinType.ChipIn))
            {
                MoveToNextSeat(amount, iHadLook, playerId, EChipinType.ChipIn);
            }
            return(new {
                rl = 1
            });
        }
Ejemplo n.º 3
0
        public void ChipInNoLook(int playerId, decimal amount)
        {
            if (IsAmountLessThanPre(amount))
            {
                return;
            }
            Seat seat = GetJionSeatByPlayerId(playerId);

            if (IsNotCurrentSeat(seat))
            {
                return;
            }
            if (seat.ChipIn(amount, IsDecutMoneySuccess, EChipinType.NoLook))
            {
                MoveToNextSeat(amount, false, playerId, EChipinType.NoLook);
            }
        }
Ejemplo n.º 4
0
        public void ChipInFollow(int playerId)
        {
            Seat seat = GetJionSeatByPlayerId(playerId);

            if (IsNotPassedCheck(seat))
            {
                return;
            }

            bool    iHadLook     = seat.IsLooked;
            decimal chipInAmount = PreSeatAmount;

            if (iHadLook != PreSeatIsLook)
            {
                if (PreSeatIsLook)
                {
                    chipInAmount = chipInAmount / 2;
                }
                else
                {
                    chipInAmount = chipInAmount * 2;
                }
            }
            if (chipInAmount > LimitAmount)
            {
                chipInAmount = LimitAmount;
            }
            EChipinType chipType = EChipinType.Nothing;

            if (iHadLook)
            {
                chipType = EChipinType.Follow;
            }
            else
            {
                chipType = EChipinType.NoLook;
            }
            if (seat.ChipIn(chipInAmount, IsDecutMoneySuccess, chipType))
            {
                MoveToNextSeat(chipInAmount, iHadLook, playerId, chipType);
            }
        }