import unittest
from evaluate.tree.alphabeta import AlphaBetaTree
from evaluate.tree.game import GameTree
from evaluate.tree.evaluator import IdentityEvaluator


class testAlphaBetaTree(unittest.TestCase):

    def testAlphaBetaTreeIsAGameTree(self):
        root = AlphaBetaTree()
        actual = isinstance(root, GameTree)
        self.assertTrue(actual)

    def testEvaluationOfAlphaBetaTree(self):
        root = AlphaBetaTree()
        root.addChild(AlphaBetaTree(0).addChild(AlphaBetaTree(1)).addChild(
            AlphaBetaTree(2)))
        root.addChild(AlphaBetaTree(0).addChild(AlphaBetaTree(-1)).addChild
            (AlphaBetaTree(-3)))
        actual = root.evaluate(IdentityEvaluator())
        self.assertEquals(1, actual)


if __name__ == '__main__':
    unittest.main()

f2a37eed0bf56049b07bcaa0281b46dfd5ac6f53
<mask token>


class testAlphaBetaTree(unittest.TestCase):
    <mask token>
    <mask token>


<mask token>

<mask token>


class testAlphaBetaTree(unittest.TestCase):

    def testAlphaBetaTreeIsAGameTree(self):
        root = AlphaBetaTree()
        actual = isinstance(root, GameTree)
        self.assertTrue(actual)

    def testEvaluationOfAlphaBetaTree(self):
        root = AlphaBetaTree()
        root.addChild(AlphaBetaTree(0).addChild(AlphaBetaTree(1)).addChild(
            AlphaBetaTree(2)))
        root.addChild(AlphaBetaTree(0).addChild(AlphaBetaTree(-1)).addChild
            (AlphaBetaTree(-3)))
        actual = root.evaluate(IdentityEvaluator())
        self.assertEquals(1, actual)


<mask token>

<mask token>


class testAlphaBetaTree(unittest.TestCase):

    def testAlphaBetaTreeIsAGameTree(self):
        root = AlphaBetaTree()
        actual = isinstance(root, GameTree)
        self.assertTrue(actual)

    def testEvaluationOfAlphaBetaTree(self):
        root = AlphaBetaTree()
        root.addChild(AlphaBetaTree(0).addChild(AlphaBetaTree(1)).addChild(
            AlphaBetaTree(2)))
        root.addChild(AlphaBetaTree(0).addChild(AlphaBetaTree(-1)).addChild
            (AlphaBetaTree(-3)))
        actual = root.evaluate(IdentityEvaluator())
        self.assertEquals(1, actual)


if __name__ == '__main__':
    unittest.main()

import unittest
from evaluate.tree.alphabeta import AlphaBetaTree
from evaluate.tree.game import GameTree
from evaluate.tree.evaluator import IdentityEvaluator


class testAlphaBetaTree(unittest.TestCase):

    def testAlphaBetaTreeIsAGameTree(self):
        root = AlphaBetaTree()
        actual = isinstance(root, GameTree)
        self.assertTrue(actual)

    def testEvaluationOfAlphaBetaTree(self):
        root = AlphaBetaTree()
        root.addChild(AlphaBetaTree(0).addChild(AlphaBetaTree(1)).addChild(
            AlphaBetaTree(2)))
        root.addChild(AlphaBetaTree(0).addChild(AlphaBetaTree(-1)).addChild
            (AlphaBetaTree(-3)))
        actual = root.evaluate(IdentityEvaluator())
        self.assertEquals(1, actual)


if __name__ == '__main__':
    unittest.main()
