コード例 #1
0
ファイル: test_board.py プロジェクト: tallowen/quintago
def test_one_has_won():
    board = quint.quintago()
    board.set(0, 0, True)
    board.set(1, 0, True)
    board.set(2, 0, True)
    board.set(5, 0, True)
    board.set(5, 1, True)
    board.rotate(3, True)

    print board
    assert board.winner() == 1
コード例 #2
0
ファイル: test_board.py プロジェクト: tallowen/quintago
def test_working():
    board = quint.quintago()
    board.set(0, 0, True)
    board.set(1, 0, True)
    board.set(2, 0, True)
    board.set(5, 0, True)
    board.set(5, 1, True)
    board.rotate(3, True)

    board.set(1, 1, False)
    board.set(2, 2, False)
    board.set(3, 3, False)
    board.set(4, 4, False)
    board.set(5, 5, False)

    print board
    assert board.winner() == 2
コード例 #3
0
ファイル: test_board.py プロジェクト: tallowen/quintago
def test_wierd_diagonal():
    board = quint.quintago()

    board.set(0, 0, True)
    board.set(1, 0, True)
    board.set(2, 0, True)
    board.set(5, 0, True)
    board.set(5, 1, True)
    board.rotate(3, True)

    board.set(0, 5, False)
    board.set(1, 4, False)
    board.set(2, 3, False)
    board.set(3, 2, False)
    board.set(4, 1, False)

    print board
    assert board.winner() == 2