コード例 #1
0
ファイル: strategies_test.py プロジェクト: agend07/otello
def test_get_paths_count4():
    tekst = ''' B B B B B B B B
                B B B B B B B B
                B B B W B B B B
                B B B B W B B B
                W * W W * W * W
                W W W W W W W W
                W W W W W W W W
                W W W W W W W W ''' 
    plansza.load(tekst)

    # for path in get_paths(player, plansza, how_deep=3):
    #     print path
    assert len(list(get_paths(player, plansza, how_deep=3)))==1
    assert len(list(get_paths(player, plansza, how_deep=3))[0])==2
コード例 #2
0
ファイル: strategies_test.py プロジェクト: agend07/otello
def test_get_paths_count3():
    tekst = """ * * * * W * * *
                * * * * W * * *
                * * * * W * * *
                * * * * B * * *
                * * * B B * * *
                * * * B B * * *
                * * * * B * * *
                * * * * B * * * """
    plansza.load(tekst)
    assert len(list(get_paths(player, plansza, how_deep=3)))==0
コード例 #3
0
ファイル: strategies_test.py プロジェクト: agend07/otello
def test_get_paths_count():
    assert len(list(get_paths(player, plansza, how_deep=3)))==56