Ejemplo n.º 1
0
        private void AssertBoardAnalyzer(string aOriginBoard, List <IBoard> aBoards)
        {
            BoardAnalyzer actual    = new BoardAnalyzer(aOriginBoard, aBoards, "B0O0W0Y0G0");
            List <Ev>     actualEvs = actual.GetSortedtEvs();

            Assert.AreEqual(actual.m_TotalSubBoardWithWeight, 29160);
            AssertEv(actualEvs[0], GameRules.PlayerAction.PickShortTermCard, 1.37f, "Green");
            AssertEv(actualEvs[1], GameRules.PlayerAction.PutTrap, 0.81f, "Case(s): 4, . Minus Trap. Pas EV exacte.");
            AssertEv(actualEvs[2], GameRules.PlayerAction.RollDice, -0.19f, null);
            //AssertEv(actualEvs[3], GameRules.PlayerAction.PickLongTermCard, 1.37f, "Green");
        }
Ejemplo n.º 2
0
        private Ev GenerateRollDiceEv()
        {
            float evNextTurn = 0;

            foreach (var camel in GameRules.IDENTITY_CAMEL_NAME_UNROLLED)
            {
                if (m_OriginBoard.Contains(camel.ToString()))
                {
                    evNextTurn += new BoardAnalyzer(m_OriginBoard, m_Boards, m_CamelCardString, camel.ToString()).GetSortedtEvs()[0].m_Ev;
                }
            }


            evNextTurn = evNextTurn / GameRules.IDENTITY_CAMEL_NAME_UNROLLED.Length;
            float secondEv = GetSortedtEvs()[1].m_Ev;

            Ev retval = new Ev
            {
                m_PlayerAction = GameRules.PlayerAction.RollDice,
                m_Ev           = GameRules.TRAP_REWARD - (evNextTurn - secondEv)
            };

            return(retval);
        }