def test_inf_sets():
    root = KuhnRootChanceGameState(2, CARDS_DEALINGS)
    assert root.inf_set() == "."

    assert root.play(K0Q0).inf_set() == ".K0."
    assert root.play(K0Q0).play(BET).inf_set() == ".Q0.BET"
    assert root.play(K0Q0).play(BET).play(FOLD).inf_set() == ".K0.BET.FOLD"

    assert root.inf_set() == "."

    assert root.play(Q0J0).inf_set() == ".Q0."
    assert root.play(Q0J0).play(BET).inf_set() == ".J0.BET"
    assert root.play(Q0J0).play(BET).play(FOLD).inf_set() == ".Q0.BET.FOLD"
    assert root.play(Q0J0).play(BET).play(CALL).inf_set() == ".Q0.BET.CALL"

    assert root.inf_set() == "."

    assert root.play(J0K0).inf_set() == ".J0."
    assert root.play(J0K0).play(CHECK).inf_set() == ".K0.CHECK"
    assert root.play(J0K0).play(CHECK).play(
        CHECK).inf_set() == ".J0.CHECK.CHECK"
    assert root.play(J0K0).play(CHECK).play(BET).inf_set() == ".J0.CHECK.BET"
    assert root.play(J0K0).play(CHECK).play(BET).play(
        CALL).inf_set() == ".K0.CHECK.BET.CALL"
    assert root.play(J0K0).play(CHECK).play(BET).play(
        FOLD).inf_set() == ".K0.CHECK.BET.FOLD"
Example #2
0
def test_inf_sets():
    root = KuhnRootChanceGameState(CARDS_DEALINGS)
    assert root.inf_set() == "."
    assert root.play(KQ).inf_set() == ".K."
    assert root.play(KQ).play(BET).inf_set() == ".Q.BET"
    assert root.play(KQ).play(BET).play(FOLD).inf_set() == ".K.BET.FOLD"

    assert root.inf_set() == "."
    assert root.play(QJ).inf_set() == ".Q."
    assert root.play(QJ).play(BET).inf_set() == ".J.BET"
    assert root.play(QJ).play(BET).play(FOLD).inf_set() == ".Q.BET.FOLD"
    assert root.play(QJ).play(BET).play(CALL).inf_set() == ".Q.BET.CALL"

    assert root.inf_set() == "."
    assert root.play(JK).inf_set() == ".J."
    assert root.play(JK).play(CHECK).inf_set() == ".K.CHECK"
    assert root.play(JK).play(CHECK).play(CHECK).inf_set() == ".J.CHECK.CHECK"
    assert root.play(JK).play(CHECK).play(BET).inf_set() == ".J.CHECK.BET"
    assert root.play(JK).play(CHECK).play(BET).play(CALL).inf_set() == ".K.CHECK.BET.CALL"
    assert root.play(JK).play(CHECK).play(BET).play(FOLD).inf_set() == ".K.CHECK.BET.FOLD"