def test_end_state_win():
    from agents.common import check_end_state, GameState
    from agents.common import check_connect_topright_bottomleft
    initialBoard = np.ndarray(shape=(6, 7), dtype=BoardPiece)
    initialBoard.fill(NO_PLAYER)
    initialBoard[(5, 0)] = 1
    initialBoard[(4, 1)] = 1
    initialBoard[(3, 2)] = 1
    initialBoard[(2, 3)] = 1
    assert (check_end_state(initialBoard, PLAYER1, 0) == GameState.IS_WIN)
def test_end_state_win():
    from agents.common import check_end_state, GameState
    from agents.common import check_connect_topright_bottomleft
    initialBoard = np.ndarray(shape=(6, 7), dtype=BoardPiece)
    initialBoard.fill(NO_PLAYER)
    initialBoard[(5, 0)] = 1
    initialBoard[(4, 1)] = 1
    initialBoard[(3, 2)] = 1
    initialBoard[(2, 3)] = 1
    assert (check_end_state(initialBoard, PLAYER1, 0) == GameState.IS_WIN)