예제 #1
0
def test_calculate_diagonal_nowin():
    gc = GameChecker([1, 2, 3, 4], 2)
    new_array = [[2, 0, 0, 0, 0, 0], [0, 2, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0],
                 [0, 0, 0, 2, 0, 0]]
    assert gc.calculate_diagonal(new_array) is False
예제 #2
0
def test_calculate_diagonal_left_win():
    gc = GameChecker([1, 2, 3, 4], 2)
    new_array = [[0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 2, 0], [0, 0, 0, 2, 0, 0],
                 [0, 0, 2, 0, 0, 0]]
    assert gc.calculate_diagonal(new_array) is True