コード例 #1
0
        public void ConditionFromBlackboard_Green()
        {
            BT.BT bt = new BT.BT(null);
            bt.BlackBoard.SetValue("foo", 10);
            bt.BlackBoard.SetValue("bar", 10);

            var dec = new BlackBoardCondition <IntCondition, int>("foo", "bar", ConditionType.Equal);

            Assert.That(dec.OnNodeCondition(bt), Is.EqualTo(true));
        }
コード例 #2
0
        public void CoditionLess_Red()
        {
            BT.BT bt = new BT.BT(null);
            bt.BlackBoard.SetValue("foo", 0);
            bt.BlackBoard.SetValue("bar", 200);

            var dec = new BlackBoardCondition <IntCondition, int>("bar", "foo", ConditionType.Less);

            Assert.That(dec.OnNodeCondition(bt), Is.EqualTo(false));
        }