Exemplo n.º 1
0
        public void TestInitialize()
        {
            A.CallTo(() => deterministicEndState.ToString()).Returns(nameof(deterministicEndState));
            deterministicEndState.SetAsEndState();
            deterministicEndState.SetEvaluationTo(0);

            A.CallTo(() => probabilisticEndState.ToString()).Returns(nameof(probabilisticEndState));
            probabilisticEndState.SetAsEndState();
            probabilisticEndState.SetEvaluationTo(0);

            A.CallTo(() => startState.ToString()).Returns(nameof(startState));
            A.CallTo(() => startState.Turn).Returns(Player.Max);
            A.CallTo(() => deterministicEndState.Turn).Returns(Player.Min);
            A.CallTo(() => probabilisticEndState.Turn).Returns(Player.Min);
        }
        public void TestInitialize()
        {
            A.CallTo(() => startState.ToString()).Returns(nameof(startState));
            A.CallTo(() => probabilisticState1.ToString()).Returns(nameof(probabilisticState1));
            A.CallTo(() => probabilisticState2.ToString()).Returns(nameof(probabilisticState2));
            A.CallTo(() => evaluation2State.ToString()).Returns(nameof(evaluation2State));
            A.CallTo(() => evaluationNagitive2State.ToString()).Returns(nameof(evaluationNagitive2State));

            evaluation2State.SetEvaluationTo(2);
            evaluationNagitive2State.SetEvaluationTo(-2);

            A.CallTo(() => startState.Turn).Returns(Player.Max);
            A.CallTo(() => probabilisticState1.Turn).Returns(Player.Min);
            A.CallTo(() => probabilisticState2.Turn).Returns(Player.Min);
            A.CallTo(() => evaluation2State.Turn).Returns(Player.Max);
            A.CallTo(() => evaluationNagitive2State.Turn).Returns(Player.Max);

            evaluation2State.SetAsEndState();
            evaluationNagitive2State.SetAsEndState();
            startState.SetNeigbors(new List <IState> {
                probabilisticState1, probabilisticState2
            });
        }