Ejemplo n.º 1
0
        //All in amount is adjusted after actions is parsed
        static HandAction ParseAllInAction(JToken action, List <HandAction> actions, Street currentStreet)
        {
            string  name   = action["player"].ToString();
            decimal amount = action["value"].Value <decimal>();

            HandActionType allInType = BossMediaAllInAdjuster.GetAllInActionType(name, amount, currentStreet, actions);

            return(new HandAction(name, allInType, amount, currentStreet, true));
        }
Ejemplo n.º 2
0
        void TestAllInAdjustment(List <HandAction> actions, HandAction allinAction, HandActionType expectedType, decimal expectedAmount)
        {
            var allinType    = BossMediaAllInAdjuster.GetAllInActionType(allinAction.PlayerName, allinAction.Absolute, allinAction.Street, actions);
            var actualAmount = allinAction.Absolute;

            if (allinType == HandActionType.CALL)
            {
                actualAmount = BossMediaAllInAdjuster.GetAdjustedCallAllInAmount(allinAction.PlayerName, allinAction.Absolute, allinAction.Street, actions);
            }

            Assert.AreEqual(expectedType, allinType);
            Assert.AreEqual(expectedAmount, actualAmount);
        }